Implement Ctrl-C handling and fix a large number of small bugs

This commit is contained in:
2019-09-28 19:46:10 +01:00
parent 006f8db6f6
commit 15ca45e5df
12 changed files with 88 additions and 61 deletions

View File

@@ -11,18 +11,21 @@ class SwhoCommand:
failure("Network does not exist: %s" % spl[1])
return
for i in main.IRCPool.keys():
if spl[1] in i:
if spl[1] == main.IRCPool[i].net:
for x in main.IRCPool[i].channels:
main.IRCPool[i].who(x)
success("Sent WHO to all channels on all networks on %s" % spl[1])
success("Sent WHO to all channels on all networks for %s" % spl[1])
return
elif length == 3:
if not spl[1] in main.network.keys():
failure("Network does not exist: %s" % spl[1])
return
matches = []
# This loop gets all networks where the core network matches spl[1]
# where there is also a currently joined channel matching spl[2]
for i in main.IRCPool.keys():
if spl[1] in i:
if spl[1] == main.IRCPool[i].net:
for x in main.IRCPool[i].channels:
if x == spl[2]:
main.IRCPool[i].who(x)