Fix pong response
parent
6984c4a8df
commit
a09f7b1d7e
5
itte.py
5
itte.py
|
@ -72,8 +72,9 @@ class IRC:
|
||||||
|
|
||||||
def keepalive(self, line):
|
def keepalive(self, line):
|
||||||
"""Stay connected to a server by responding to server pings."""
|
"""Stay connected to a server by responding to server pings."""
|
||||||
if "PING" in line:
|
resp = line.split(" ", 1)[1]
|
||||||
self.send("PONG", ":" + line.split(":", 2)[1].split(" ", 1)[0])
|
if ("PING " + resp) in line:
|
||||||
|
self.send("PONG", resp)
|
||||||
|
|
||||||
def join_channels(self, channels):
|
def join_channels(self, channels):
|
||||||
"""Join channels given a list of channel names."""
|
"""Join channels given a list of channel names."""
|
||||||
|
|
|
@ -86,7 +86,7 @@ class Ramen:
|
||||||
combo += self.rand(dish["broth"] + dish["broth-veggie"])
|
combo += self.rand(dish["broth"] + dish["broth-veggie"])
|
||||||
combo += " broth"
|
combo += " broth"
|
||||||
# Topping
|
# Topping
|
||||||
n_top = randint(2, 4)
|
n_top = randint(2, 5)
|
||||||
for n in range(2, n_top+1):
|
for n in range(2, n_top+1):
|
||||||
if n == 2:
|
if n == 2:
|
||||||
if is_veggie:
|
if is_veggie:
|
||||||
|
|
Loading…
Reference in New Issue