fix addspook not deleting itself
This commit is contained in:
parent
c42e5edcc1
commit
bccf3c855a
1 changed files with 5 additions and 5 deletions
|
@ -153,8 +153,8 @@ class Ot:
|
||||||
def __init__(self, al, ms):
|
def __init__(self, al, ms):
|
||||||
self.ms = str(ms)
|
self.ms = str(ms)
|
||||||
self.al = str(al)
|
self.al = str(al)
|
||||||
self.__class__.ots[al] = ms
|
self.__class__.ots[self.al] = ms
|
||||||
shared.rawm[al] = self.ot
|
shared.rawm[self.al] = self.ot
|
||||||
|
|
||||||
async def ot(alself, self, c, n, m):
|
async def ot(alself, self, c, n, m):
|
||||||
if alself.al in m and n != self.nickname:
|
if alself.al in m and n != self.nickname:
|
||||||
|
@ -173,12 +173,12 @@ class Spook:
|
||||||
def __init__(self, al, ms):
|
def __init__(self, al, ms):
|
||||||
self.ms = str(ms)
|
self.ms = str(ms)
|
||||||
self.al = str(al)
|
self.al = str(al)
|
||||||
self.__class__.spooks[al] = ms
|
self.__class__.spooks[self.al] = ms
|
||||||
shared.rawm[al] = self.spook
|
shared.rawm[self.al] = self.spook
|
||||||
|
|
||||||
async def spook(alself, self, c, n, m):
|
async def spook(alself, self, c, n, m):
|
||||||
if alself.al in m and n != self.nickname:
|
if alself.al in m and n != self.nickname:
|
||||||
asyncio.create_task(self.send(build("PRIVMSG", [c, alself.ms.format(m)])))
|
self.send(build("PRIVMSG", [c, alself.ms.format(m)]))
|
||||||
shared.rawm.pop(alself.al)
|
shared.rawm.pop(alself.al)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue