diff --git a/main.py b/main.py index 5da7e9f..7fc63eb 100755 --- a/main.py +++ b/main.py @@ -43,7 +43,7 @@ class Irc(): # capability information is received. This handling of irc.connected # is also dependent on the protocol module. self.maxnicklen = 30 - self.prefixmodes = 'ov' + self.prefixmodes = {'o': '@', 'v': '+'} # Uplink SID (filled in by protocol module) self.uplink = None diff --git a/protocols/inspircd.py b/protocols/inspircd.py index 3867e65..8823af7 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -535,7 +535,9 @@ def handle_events(irc, data): = caps['CHANMODES'].split(',') irc.umodes['*A'], irc.umodes['*B'], irc.umodes['*C'], irc.umodes['*D'] \ = caps['USERMODES'].split(',') - irc.prefixmodes = re.search(r'\((.*?)\)', caps['PREFIX']).group(1) + prefixsearch = re.search(r'\(([A-Za-z]+)\)(.*)', caps['PREFIX']) + irc.prefixmodes = dict(zip(prefixsearch.group(1), prefixsearch.group(2))) + log.debug('(%s) irc.prefixmodes set to %r', irc.name, irc.prefixmodes) # Sanity check: set this AFTER we fetch the capabilities for the network! irc.connected.set() try: