Moved files to subdirectory
This commit is contained in:
25
legacy/commands/all.py
Normal file
25
legacy/commands/all.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import main
|
||||
from utils.deliver_relay_commands import deliverRelayCommands
|
||||
|
||||
|
||||
class AllCommand:
|
||||
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.network.keys():
|
||||
for x in main.network[i].relays.keys():
|
||||
num = main.network[i].relays[x]["id"]
|
||||
net = main.network[i].relays[x]["net"]
|
||||
alias = main.alias[x]["nick"]
|
||||
commands = {spl[1]: [" ".join(spl[2:])]}
|
||||
success("Sending commands to relay %s as user %s" % (num, alias + "/" + net))
|
||||
deliverRelayCommands(num, commands, user=alias + "/" + net)
|
||||
return
|
||||
else:
|
||||
incUsage("all")
|
||||
return
|
||||
else:
|
||||
incUsage(None)
|
||||
Reference in New Issue
Block a user