Avoid doing pointless lookups against numbered networks

This commit is contained in:
2018-10-14 14:47:08 +01:00
parent 9dc202fd53
commit 7d7ef69d98
2 changed files with 13 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ def getWhoSingle(name, query):
def getWho(query):
result = {}
for i in main.pool.keys():
for i in main.nets():
f = getWhoSingle(i, query)
if f:
result[i] = f
@@ -25,7 +25,7 @@ def getChansSingle(name, nick):
def getChans(nick):
result = {}
for i in main.pool.keys():
for i in main.nets():
f = getChansSingle(i, nick)
if f:
result[i] = f
@@ -40,7 +40,7 @@ def getUsersSingle(name, nick):
def getUsers(nick):
result = {}
for i in main.pool.keys():
for i in main.nets():
f = getUsersSingle(i, nick)
if f:
result[i] = f
@@ -51,7 +51,7 @@ def getNumWhoEntries(name):
def getNumTotalWhoEntries():
total = 0
for i in main.pool.keys():
for i in main.nets():
total += getNumWhoEntries(i)
return total