forked from Firepup650/FireBot
Forgot PING of all things.
This commit is contained in:
parent
26e4bd0789
commit
28d910c095
1 changed files with 6 additions and 1 deletions
7
bot.py
7
bot.py
|
@ -117,6 +117,11 @@ class bot:
|
|||
self.channels[chan] = 0
|
||||
break
|
||||
|
||||
def ping(self, ircmsg: str) -> int:
|
||||
pong = f"PONG :{ircmsg.split('PING :')[1]}\n"
|
||||
print(pong, end="")
|
||||
return self.send(pong)
|
||||
|
||||
def send(self, command: str) -> int:
|
||||
return self.sock.send(bytes(command))
|
||||
|
||||
|
@ -204,7 +209,7 @@ class bot:
|
|||
raw = self.recv()
|
||||
ircmsg = raw.decode()
|
||||
if ircmsg == "":
|
||||
exit("Probably a netsplit")
|
||||
self.exit("Probably a netsplit")
|
||||
else:
|
||||
print(raw.lazy_decode(), sep="\n")
|
||||
action = "Unknown"
|
||||
|
|
Loading…
Reference in a new issue