mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-07 19:49:23 +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>
(cherry picked from commit c9e548bdd9
)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
parent
c2b6633fe7
commit
edbf43f81f
@ -401,6 +401,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