diff --git a/protocols/clientbot.py b/protocols/clientbot.py index 1f262aa..4a0fe38 100644 --- a/protocols/clientbot.py +++ b/protocols/clientbot.py @@ -1033,7 +1033,8 @@ class ClientbotWrapperProtocol(IRCCommonProtocol): log.warning('(%s) Received %s to %s being routed the wrong way!', self.name, command, target) return - if not self.is_channel(target): + real_target = target.lstrip(''.join(self.prefixmodes.values())) + if not self.is_channel(real_target): target = self.nick_to_uid(target) if target: diff --git a/protocols/ircs2s_common.py b/protocols/ircs2s_common.py index 83b9b03..d0704d0 100644 --- a/protocols/ircs2s_common.py +++ b/protocols/ircs2s_common.py @@ -318,6 +318,12 @@ class IRCCommonProtocol(IRCNetwork): self.umodes['callerid'] = newcaps.get('CALLERID') or 'g' log.debug('(%s) handle_005: got umode callerid=%r', self.name, self.umodes['callerid']) + if 'STATUSMSG' in newcaps: + # Note: This assumes that all available prefixes can be used in STATUSMSG too. + # Even though this isn't always true, I don't see the point in making things + # any more complicated. + self.protocol_caps |= {'has-statusmsg'} + def _send_with_prefix(self, source, msg, **kwargs): """Sends a RFC1459-style raw command from the given sender.""" self.send(':%s %s' % (self._expandPUID(source), msg), **kwargs)