.BANCHO. Report result is now a notification rather than a FokaBot message
This commit is contained in:
parent
7f534f0984
commit
7ba5db62b4
|
@ -741,7 +741,7 @@ def report(fro, chan, message):
|
|||
chat.sendMessage("FokaBot", "#admin", adminMsg)
|
||||
log.warning(adminMsg, discord="cm")
|
||||
except exceptions.invalidUserException:
|
||||
msg = "You can't report. I won't forget what you've tried to do. Watch out."
|
||||
msg = "Hello, FokaBot here! You can't report me. I won't forget what you've tried to do. Watch out."
|
||||
except exceptions.invalidArgumentsException:
|
||||
msg = "Invalid report command syntax. To report an user, click on it and select 'Report user'."
|
||||
except exceptions.userNotFoundException:
|
||||
|
@ -752,6 +752,11 @@ def report(fro, chan, message):
|
|||
raise
|
||||
finally:
|
||||
if msg != "":
|
||||
token = glob.tokens.getTokenFromUsername(fro)
|
||||
if token is not None:
|
||||
if not token.irc:
|
||||
token.enqueue(serverPackets.notification(msg))
|
||||
else:
|
||||
chat.sendMessage("FokaBot", fro, msg)
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user