Keep a list of CAP capabilities in IRCServer
This commit is contained in:
parent
94945da9be
commit
759cd64f33
2 changed files with 6 additions and 1 deletions
|
@ -283,9 +283,12 @@ class LineHandler(object):
|
||||||
event["server"].send_capability_queue()
|
event["server"].send_capability_queue()
|
||||||
else:
|
else:
|
||||||
event["server"].send_capability_end()
|
event["server"].send_capability_end()
|
||||||
elif subcommand == "ack" or subcommand == "nack":
|
elif subcommand == "ack":
|
||||||
if not event["server"].waiting_for_capabilities():
|
if not event["server"].waiting_for_capabilities():
|
||||||
event["server"].send_capability_end()
|
event["server"].send_capability_end()
|
||||||
|
event["server"].capabilities = set(capabilities)
|
||||||
|
elif subcommand == "ack" or subcommand == "nack":
|
||||||
|
event["server"].send_capability_end()
|
||||||
|
|
||||||
# the server is asking for authentication
|
# the server is asking for authentication
|
||||||
def authenticate(self, event):
|
def authenticate(self, event):
|
||||||
|
|
|
@ -26,8 +26,10 @@ class Server(object):
|
||||||
self.original_username = username or nickname
|
self.original_username = username or nickname
|
||||||
self.original_realname = realname or nickname
|
self.original_realname = realname or nickname
|
||||||
self.name = None
|
self.name = None
|
||||||
|
|
||||||
self._capability_queue = set([])
|
self._capability_queue = set([])
|
||||||
self._capabilities_waiting = set([])
|
self._capabilities_waiting = set([])
|
||||||
|
self.capabilities = set([])
|
||||||
|
|
||||||
self.write_buffer = b""
|
self.write_buffer = b""
|
||||||
self.buffered_lines = []
|
self.buffered_lines = []
|
||||||
|
|
Loading…
Reference in a new issue