Improvements to query and self event detection, implement all command and debug flags
This commit is contained in:
23
commands/all.py
Normal file
23
commands/all.py
Normal file
@@ -0,0 +1,23 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user