diff options
| -rw-r--r-- | IRCLineHandler.py | 3 | ||||
| -rw-r--r-- | IRCServer.py | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/IRCLineHandler.py b/IRCLineHandler.py index d8958795..b995a0af 100644 --- a/IRCLineHandler.py +++ b/IRCLineHandler.py @@ -267,6 +267,9 @@ class LineHandler(object): event["server"].send_capability_queue() else: event["server"].send_capability_end() + elif subcommand == "ack" or subcommand == "nack": + if not event["server"].waiting_for_capabilities(): + event["server"].send_capability_end() # the server is asking for authentication def authenticate(self, event): diff --git a/IRCServer.py b/IRCServer.py index 9cb5e18f..1d30e1f9 100644 --- a/IRCServer.py +++ b/IRCServer.py @@ -293,6 +293,8 @@ class Server(object): def send_authenticate(self, text): self.send("AUTHENTICATE %s" % text) + def waiting_for_capabilities(self): + return bool(len(self._capabilities_waiting)) def wait_for_capability(self, capability): self._capabilities_waiting.add(capability) def capability_done(self, capability): |
