From 7ba5db62b4a0fa486bc9429ce29ab7d8d29b287e Mon Sep 17 00:00:00 2001 From: Nyo Date: Mon, 12 Dec 2016 22:57:00 +0100 Subject: [PATCH] .BANCHO. Report result is now a notification rather than a FokaBot message --- constants/fokabotCommands.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/constants/fokabotCommands.py b/constants/fokabotCommands.py index 4bf86a8..790ba7b 100644 --- a/constants/fokabotCommands.py +++ b/constants/fokabotCommands.py @@ -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,7 +752,12 @@ def report(fro, chan, message): raise finally: if msg != "": - chat.sendMessage("FokaBot", fro, 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 """