From 40eb691cd4dcdfe86d3e00c6208002401556da71 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 7 Oct 2018 21:17:40 +0200 Subject: [PATCH] Create hash password when creating irc bot. --- evennia/commands/default/comms.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/evennia/commands/default/comms.py b/evennia/commands/default/comms.py index d9fe0b0d20..04fcceba46 100644 --- a/evennia/commands/default/comms.py +++ b/evennia/commands/default/comms.py @@ -7,6 +7,8 @@ make sure to homogenize self.caller to always be the account object for easy handling. """ +import hashlib +import time from past.builtins import cmp from django.conf import settings from evennia.comms.models import ChannelDB, Msg @@ -918,8 +920,9 @@ class CmdIRC2Chan(COMMAND_DEFAULT_CLASS): self.msg("Account '%s' already exists and is not a bot." % botname) return else: + password = hashlib.md5(str(time.time())).hexdigest()[:11] try: - bot = create.create_account(botname, None, None, typeclass=botclass) + bot = create.create_account(botname, None, password, typeclass=botclass) except Exception as err: self.msg("|rError, could not create the bot:|n '%s'." % err) return