From 4f9ca6088b34a71a5ee02f77e609441162e0dab9 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 31 May 2020 13:08:00 +0100 Subject: [PATCH] Allow sending LIST to all networks at once --- commands/list.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/commands/list.py b/commands/list.py index 44cd366..3839914 100644 --- a/commands/list.py +++ b/commands/list.py @@ -6,7 +6,18 @@ class ListCommand: def list(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length): if authed: - if length == 2: + if length == 1: + for i in main.network.keys(): + if not 1 in main.network[i].relays.keys(): + info("Network has no first instance: %s" % i) + continue + if not i+"1" in main.IRCPool.keys(): + info("No IRC instance: %s - 1" % i) + continue + main.IRCPool[i+"1"].list() + success("Requested list with first instance of %s" % i) + return + elif length == 2: if not spl[1] in main.network.keys(): failure("No such network: %s" % spl[1]) return