Renovate the module system and implement adding and resuming pool instances using the new relay/alias/network system
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import main
|
||||
from core.bot import deliverRelayCommands
|
||||
|
||||
class Disable:
|
||||
def __init__(self, register):
|
||||
register("disable", self.disable)
|
||||
def __init__(self, *args):
|
||||
self.disable(*args)
|
||||
|
||||
def disable(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
||||
if authed:
|
||||
@@ -11,6 +12,11 @@ class Disable:
|
||||
failure("Name does not exist: %s" % spl[1])
|
||||
return
|
||||
main.pool[spl[1]]["enabled"] = False
|
||||
user = main.pool[spl[1]]["alias"]
|
||||
network = main.pool[spl[1]]["network"]
|
||||
relay = main.pool[spl[1]]["relay"]
|
||||
commands = {"status": ["Disconnect"]}
|
||||
deliverRelayCommands(relay, commands, user=user+"/"+network)
|
||||
main.saveConf("pool")
|
||||
if spl[1] in main.ReactorPool.keys():
|
||||
if spl[1] in main.FactoryPool.keys():
|
||||
|
||||
Reference in New Issue
Block a user