Correctly handle erroneus #dbref input for ircstatus.

This commit is contained in:
Griatch 2017-02-12 08:49:05 +01:00
parent e08cb2bb48
commit 171761949a
2 changed files with 3 additions and 3 deletions

View file

@ -962,8 +962,8 @@ class CmdIRCStatus(COMMAND_DEFAULT_CLASS):
matches = None
if utils.dbref(botname):
matches = PlayerDB.objects.filter(db_is_bot=True, id=utils.dbref(botname))
else:
self.msg("No matching IRC-bot was found.")
if not matches:
self.msg("No matching IRC-bot found. Use @ircstatus without arguments to list active bots.")
return
ircbot = matches[0]
channel = ircbot.db.irc_channel

View file

@ -320,7 +320,7 @@ class IRCBot(Bot):
# some bot info
text = "This is an Evennia IRC bot connecting from '%s'." % settings.SERVERNAME
else:
text = "I understand 'who' and 'about'"
text = "I understand 'who' and 'about'."
super(IRCBot, self).msg(privmsg=((text,), {"user":user}))
else:
# something to send to the main channel