From 4fd2ae9d00d670eba5c40db5fb61318da916ed72 Mon Sep 17 00:00:00 2001 From: xfnw Date: Sun, 4 Oct 2020 15:46:49 -0400 Subject: [PATCH] fixed triggers to not be triggered by itself --- modules/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin.py b/modules/admin.py index e1760f3..6a5c45d 100644 --- a/modules/admin.py +++ b/modules/admin.py @@ -123,7 +123,7 @@ class Ot(): self.ms = str(ms) self.al = str(al) async def ot(alself,self,c,n,m): - if alself.al in m: + if alself.al in m and n != self.nickname: asyncio.create_task(self.on_message(c,n,alself.ms.format(m))) self.rawm.pop(alself.al) @@ -170,7 +170,7 @@ async def adminHandle(self, chan, source, msg): await self.message(chan, '[\x036admin\x0f] Invalid command') return print('[ADMIN MODULE] {} told me to {}!!!'.format(source,msg[0])) - await commands[msg.pop(0)](self, chan, source, ' '.join(msg)) + asyncio.create_task(commands[msg.pop(0)](self, chan, source, ' '.join(msg))) else: await self.message(chan, '[\x036admin\x0f] You do not have permission to do this')