Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix parsing of 004 message. (Broken in d9531d2).

  • Loading branch information...
commit d2ab53cd194eec0ad898d3e53aaf9c1988960bff 1 parent 0780d44
@ProgVal authored
Showing with 4 additions and 4 deletions.
  1. +3 −3 src/irclib.py
  2. +1 −1  test/test_irclib.py
View
6 src/irclib.py
@@ -406,10 +406,10 @@ def do004(self, irc, msg):
"""Handles parsing the 004 reply
Supported user and channel modes are cached"""
- # msg.args = [server, ircd-version, umodes, modes,
+ # msg.args = [nickname, server, ircd-version, umodes, modes,
# modes that require arguments? (non-standard)]
- self.supported['umodes'] = msg.args[2]
- self.supported['chanmodes'] = msg.args[3]
+ self.supported['umodes'] = msg.args[3]
+ self.supported['chanmodes'] = msg.args[4]
_005converters = utils.InsensitivePreservingDict({
'modes': int,
View
2  test/test_irclib.py
@@ -292,7 +292,7 @@ def testIRCNet005(self):
def testSupportedUmodes(self):
state = irclib.IrcState()
- state.addMsg(self.irc, ircmsgs.IrcMsg(':charm.oftc.net 004 charm.oftc.net hybrid-7.2.2+oftc1.6.8 CDGPRSabcdfgiklnorsuwxyz biklmnopstveI bkloveI'))
+ state.addMsg(self.irc, ircmsgs.IrcMsg(':charm.oftc.net 004 adkwbot charm.oftc.net hybrid-7.2.2+oftc1.6.8 CDGPRSabcdfgiklnorsuwxyz biklmnopstveI bkloveI'))
self.assertEqual(state.supported['umodes'], 'CDGPRSabcdfgiklnorsuwxyz')
self.assertEqual(state.supported['chanmodes'],
'biklmnopstveI')
Please sign in to comment.
Something went wrong with that request. Please try again.