Fix LIST handling and message parsing

* Always use simple LIST syntax if it succeeded once after a failed
complex query
* Reject asking for a LIST twice
* Quickly discard any ISUPPORT messages that don't contain things we
need to use
* Detect the server name and drop any messages from the server
This commit is contained in:
2019-10-20 16:44:33 +01:00
parent f34de8940f
commit b4fa747853
3 changed files with 64 additions and 26 deletions

View File

@@ -27,7 +27,6 @@ def getChanFree(net, new):
name = net+str(i)
chanfree[i] = main.IRCPool[name].chanlimit-len(main.IRCPool[name].channels)
chanlimits.add(main.IRCPool[name].chanlimit)
if not len(chanlimits) == 1:
error("Network %s has servers with different CHANMAX values" % net)
return False
@@ -39,7 +38,6 @@ def emptyChanAllocate(net, flist, relay, new):
return
for i in new:
chanfree[0][i] = chanfree[1]
print("chanfree", chanfree)
allocated = {}
toalloc = len(flist)
if toalloc > sum(chanfree[0].values()):

View File

@@ -7,7 +7,7 @@ from utils.logging.debug import debug
from utils.parsing import parsen
def getWhoSingle(name, query):
result = main.r.sscan("live.who."+name, 0, query, count=-1)
result = main.r.sscan("live.who."+name, 0, query, count=999999)
if result[1] == []:
return None
return (i.decode() for i in result[1])