2019-10-02 12:46:02 +00:00
|
|
|
import main
|
2022-07-21 12:40:03 +00:00
|
|
|
from utils.deliver_relay_commands import deliverRelayCommands
|
2019-10-02 12:46:02 +00:00
|
|
|
|
2022-07-21 12:39:41 +00:00
|
|
|
|
2019-10-02 12:46:02 +00:00
|
|
|
class AdmallCommand:
|
|
|
|
def __init__(self, *args):
|
|
|
|
self.admall(*args)
|
|
|
|
|
2022-07-21 12:40:01 +00:00
|
|
|
def admall(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
2019-10-02 12:46:02 +00:00
|
|
|
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"]
|
|
|
|
commands = {spl[1]: [" ".join(spl[2:])]}
|
|
|
|
success("Sending commands to relay %s" % (num))
|
|
|
|
deliverRelayCommands(num, commands)
|
|
|
|
return
|
|
|
|
else:
|
|
|
|
incUsage("admall")
|
|
|
|
return
|
|
|
|
else:
|
|
|
|
incUsage(None)
|