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

@@ -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])