diff --git a/src/irclib.py b/src/irclib.py index 180979204..12a57a209 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -971,7 +971,7 @@ class IrcState(IrcCommandDispatcher, log.Firewalled): if prefix is None: prefix_chars = '@%+&~!' # see the comments in addUser else: - prefix_chars = prefix.split(')', 1)[-1] + prefix_chars = ''.join(prefix.values()) for item in items.split(): stripped_item = item.lstrip(prefix_chars) diff --git a/test/test_irclib.py b/test/test_irclib.py index 18792e551..e747a2312 100644 --- a/test/test_irclib.py +++ b/test/test_irclib.py @@ -554,7 +554,8 @@ class IrcStateTestCase(SupyTestCase): # Prefixed with chars not in ISUPPORT PREFIX st = irclib.IrcState() - st.supported['PREFIX'] = '(ov)@+' + st.addMsg(self.irc, ircmsgs.IrcMsg(command='005', + args=('*', 'PREFIX=(ov)@+', 'are supported'))) st.addMsg(self.irc, ircmsgs.IrcMsg(command='353', args=('*', '=', '#chan', 'nick1!u1@h1 @nick2!u2@h2 ~@nick3!u3@h3'))) chan_st = st.channels['#chan']