Additional checks when disabling or deleting bots
This commit is contained in:
parent
aacb50d5d2
commit
57e54cbced
|
@ -670,6 +670,7 @@ class Helper(object):
|
||||||
if spl[1] in FactoryPool.keys():
|
if spl[1] in FactoryPool.keys():
|
||||||
FactoryPool[spl[1]].stopTrying()
|
FactoryPool[spl[1]].stopTrying()
|
||||||
ReactorPool[spl[1]].disconnect()
|
ReactorPool[spl[1]].disconnect()
|
||||||
|
if spl[1] in IRCPool.keys():
|
||||||
del IRCPool[spl[1]]
|
del IRCPool[spl[1]]
|
||||||
del ReactorPool[spl[1]]
|
del ReactorPool[spl[1]]
|
||||||
del FactoryPool[spl[1]]
|
del FactoryPool[spl[1]]
|
||||||
|
@ -998,10 +999,14 @@ class Helper(object):
|
||||||
failure("Name does not exist: %s" % spl[1])
|
failure("Name does not exist: %s" % spl[1])
|
||||||
return
|
return
|
||||||
del pool[spl[1]]
|
del pool[spl[1]]
|
||||||
|
if spl[1] in ReactorPool.keys():
|
||||||
|
if spl[1] in FactoryPool.keys():
|
||||||
|
FactoryPool[spl[1]].stopTrying()
|
||||||
|
ReactorPool[spl[1]].disconnect()
|
||||||
if spl[1] in IRCPool.keys():
|
if spl[1] in IRCPool.keys():
|
||||||
if IRCPool[spl[1]].connected == True:
|
|
||||||
IRCPool[spl[1]].transport.loseConnection()
|
|
||||||
del IRCPool[spl[1]]
|
del IRCPool[spl[1]]
|
||||||
|
del ReactorPool[spl[1]]
|
||||||
|
del FactoryPool[spl[1]]
|
||||||
success("Successfully removed bot")
|
success("Successfully removed bot")
|
||||||
self.save("pool")
|
self.save("pool")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue