From 67126de23e9dafe19a7f3f06ff7e0d4a141276ab Mon Sep 17 00:00:00 2001 From: EcoNooob <31904799+EcoNooob@users.noreply.github.com> Date: Wed, 13 Sep 2017 01:03:54 +0200 Subject: [PATCH] Possible fix for #58 v2! As you might have noticed, i'm also new to github..... :D had a small typo in the previous shizzle --- qai_plugin.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qai_plugin.py b/qai_plugin.py index 9094a23..6c40d68 100644 --- a/qai_plugin.py +++ b/qai_plugin.py @@ -153,6 +153,13 @@ def on_privmsg(self, *args, **kwargs): if sender.startswith("NickServ!"): self.__handleNickservMessage(msg) + return + if not msg.startswith ("!"): + if not sender in self.timers: + self.timers[sender] = 16 + if time.time() - self.timers[sender] > 15: + self.bot.privmsg(kwargs['mask'].nick, "This is an official bot run by Forged Alliance Forever. Replies to this bot are not monitored. If you need to talk to a moderator, find someone with their name in white at the top of the player list. If there are none online at this time then ask someone in chat to help you.") + self.timers[sender] = time.time() @command(permission='admin', public=False) @asyncio.coroutine @@ -1015,4 +1022,4 @@ def __dbGet(self, path): return reply def __dbSave(self): - self.bot.db.set('misc', lastSaved=time.time()) \ No newline at end of file + self.bot.db.set('misc', lastSaved=time.time())