mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
irclib: Add support for 004 messages from the server
At a minimum, the message gives us the server name, ircd version, supported umodes, and supported channel modes. Add the umodes and channel modes to self.supported. Some IRCds (e.g., hybrid and ircd-seven) have an extra arg which seems to be the channel modes that require arguments. Signed-off-by: James McCoy <vega.james@gmail.com>
This commit is contained in:
parent
ce4d26514b
commit
c9e548bdd9
@ -400,6 +400,15 @@ class IrcState(IrcCommandDispatcher):
|
||||
"""Returns the hostmask for a given nick."""
|
||||
return self.nicksToHostmasks[nick]
|
||||
|
||||
def do004(self, irc, msg):
|
||||
"""Handles parsing the 004 reply
|
||||
|
||||
Supported user and channel modes are cached"""
|
||||
# msg.args = [nick, server, ircd-version, umodes, modes,
|
||||
# modes that require arguments? (non-standard)]
|
||||
self.supported['umodes'] = msg.args[3]
|
||||
self.supported['chanmodes'] = msg.args[4]
|
||||
|
||||
_005converters = utils.InsensitivePreservingDict({
|
||||
'modes': int,
|
||||
'keylen': int,
|
||||
|
Loading…
Reference in New Issue
Block a user