fix limechat detection, fix pong_colon logic
This commit is contained in:
parent
e4c11f7289
commit
ad5b1e96ec
8
start.py
8
start.py
|
@ -116,11 +116,12 @@ def _detect(client):
|
||||||
if (not client.user_hostname_rfc1459 and
|
if (not client.user_hostname_rfc1459 and
|
||||||
not client.user_servername_rfc1459):
|
not client.user_servername_rfc1459):
|
||||||
if client.long_pong:
|
if client.long_pong:
|
||||||
return "weechat"
|
if client.pong_colon:
|
||||||
|
return "weechat"
|
||||||
|
else:
|
||||||
|
return "limechat"
|
||||||
elif client.user_hostname == "8":
|
elif client.user_hostname == "8":
|
||||||
return "polari"
|
return "polari"
|
||||||
else:
|
|
||||||
return "limechat"
|
|
||||||
elif client.user_hostname == "*" and client.user_servername == "*":
|
elif client.user_hostname == "*" and client.user_servername == "*":
|
||||||
return "burd"
|
return "burd"
|
||||||
elif (client.user_hostname == "127.0.0.1" and
|
elif (client.user_hostname == "127.0.0.1" and
|
||||||
|
@ -262,7 +263,6 @@ def listen(port: int, verbose: bool):
|
||||||
elif line.command == "PONG":
|
elif line.command == "PONG":
|
||||||
client.pong_colon = " :" in raw_line
|
client.pong_colon = " :" in raw_line
|
||||||
client.long_pong = line.args[0] == LONG_PING
|
client.long_pong = line.args[0] == LONG_PING
|
||||||
client.pong_colon = raw_line.endswith(":123")
|
|
||||||
|
|
||||||
if client.terminal_pong:
|
if client.terminal_pong:
|
||||||
_end(client)
|
_end(client)
|
||||||
|
|
Loading…
Reference in New Issue