You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
960 B
Python
26 lines
960 B
Python
5 years ago
|
import main
|
||
2 years ago
|
from utils.deliver_relay_commands import deliverRelayCommands
|
||
5 years ago
|
|
||
2 years ago
|
|
||
5 years ago
|
class AllCommand:
|
||
5 years ago
|
def __init__(self, *args):
|
||
|
self.all(*args)
|
||
|
|
||
2 years ago
|
def all(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
||
5 years ago
|
if authed:
|
||
|
if length > 2:
|
||
5 years ago
|
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"]
|
||
5 years ago
|
alias = main.alias[x]["nick"]
|
||
5 years ago
|
commands = {spl[1]: [" ".join(spl[2:])]}
|
||
2 years ago
|
success("Sending commands to relay %s as user %s" % (num, alias + "/" + net))
|
||
2 years ago
|
deliverRelayCommands(num, commands, user=alias + "/" + net)
|
||
5 years ago
|
return
|
||
|
else:
|
||
|
incUsage("all")
|
||
|
return
|
||
|
else:
|
||
|
incUsage(None)
|