parent
3746cb9b21
commit
15ab96dc58
1 changed files with 2 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
__version__ = "0.0.4"
|
__version__ = "0.0.5"
|
||||||
print(f"Codename IRCat v{__version__}")
|
print(f"Codename IRCat v{__version__}")
|
||||||
print("Welcome! /ᐠ ˵> ⩊ <˵マ")
|
print("Welcome! /ᐠ ˵> ⩊ <˵マ")
|
||||||
import socket, time, ssl, threading, traceback, sys, subprocess, yaml, sqlite3, os, bcrypt, importlib
|
import socket, time, ssl, threading, traceback, sys, subprocess, yaml, sqlite3, os, bcrypt, importlib
|
||||||
|
@ -274,7 +274,6 @@ def session(connection, client, ip, ssl=False):
|
||||||
finished = True
|
finished = True
|
||||||
elif command == "PING":
|
elif command == "PING":
|
||||||
e = text.split(" ")[1]
|
e = text.split(" ")[1]
|
||||||
print("Replying with \"" + str([f":{server} PONG {server} :{e}\r\n"]) + "\"")
|
|
||||||
connection.sendall(bytes(f":{server} PONG {server} :{e}\r\n","UTF-8"))
|
connection.sendall(bytes(f":{server} PONG {server} :{e}\r\n","UTF-8"))
|
||||||
elif command == "LIST":
|
elif command == "LIST":
|
||||||
connection.sendall(bytes(f":{server} 321 {pending} Channel :Users Name\r\n","UTF-8"))
|
connection.sendall(bytes(f":{server} 321 {pending} Channel :Users Name\r\n","UTF-8"))
|
||||||
|
@ -335,7 +334,7 @@ def session(connection, client, ip, ssl=False):
|
||||||
print("Successfully pre-loaded /NAMES list")
|
print("Successfully pre-loaded /NAMES list")
|
||||||
elif command == "PONG":
|
elif command == "PONG":
|
||||||
e = text.split(" ")[1]
|
e = text.split(" ")[1]
|
||||||
if e == server:
|
if e == server or e == f":{server}":
|
||||||
print(pending + " replied to PING.")
|
print(pending + " replied to PING.")
|
||||||
property_list[pending]["last_ping"] = time.time()
|
property_list[pending]["last_ping"] = time.time()
|
||||||
property_list[pending]["ping_pending"] = False
|
property_list[pending]["ping_pending"] = False
|
||||||
|
|
Loading…
Add table
Reference in a new issue