diff --git a/itte.py b/itte.py index 28b0bdc..66a5cb4 100644 --- a/itte.py +++ b/itte.py @@ -72,8 +72,9 @@ class IRC: def keepalive(self, line): """Stay connected to a server by responding to server pings.""" - if "PING" in line: - self.send("PONG", ":" + line.split(":", 2)[1].split(" ", 1)[0]) + resp = line.split(" ", 1)[1] + if ("PING " + resp) in line: + self.send("PONG", resp) def join_channels(self, channels): """Join channels given a list of channel names.""" diff --git a/ramenkan.py b/ramenkan.py index b6a6d73..9b9cdad 100755 --- a/ramenkan.py +++ b/ramenkan.py @@ -86,7 +86,7 @@ class Ramen: combo += self.rand(dish["broth"] + dish["broth-veggie"]) combo += " broth" # Topping - n_top = randint(2, 4) + n_top = randint(2, 5) for n in range(2, n_top+1): if n == 2: if is_veggie: