import main from core.bot import deliverRelayCommands class All: def __init__(self, *args): self.all(*args) def all(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length): if authed: if length > 2: for i in main.pool.keys(): relay = main.pool[i]["relay"] network = main.pool[i]["network"] alias = main.pool[i]["alias"] commands = {spl[1]: [" ".join(spl[2:])]} success("Sending commands to relay %s as user %s" % (relay, alias+"/"+network)) deliverRelayCommands(relay, commands, user=alias+"/"+network) return else: incUsage("all") return else: incUsage(None)