mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
clientbot: add STATUSMSG support (#570)
This commit is contained in:
parent
81bd1e8474
commit
37be73d39c
@ -1033,7 +1033,8 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
|
|||||||
log.warning('(%s) Received %s to %s being routed the wrong way!', self.name, command, target)
|
log.warning('(%s) Received %s to %s being routed the wrong way!', self.name, command, target)
|
||||||
return
|
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)
|
target = self.nick_to_uid(target)
|
||||||
|
|
||||||
if target:
|
if target:
|
||||||
|
@ -318,6 +318,12 @@ class IRCCommonProtocol(IRCNetwork):
|
|||||||
self.umodes['callerid'] = newcaps.get('CALLERID') or 'g'
|
self.umodes['callerid'] = newcaps.get('CALLERID') or 'g'
|
||||||
log.debug('(%s) handle_005: got umode callerid=%r', self.name, self.umodes['callerid'])
|
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):
|
def _send_with_prefix(self, source, msg, **kwargs):
|
||||||
"""Sends a RFC1459-style raw command from the given sender."""
|
"""Sends a RFC1459-style raw command from the given sender."""
|
||||||
self.send(':%s %s' % (self._expandPUID(source), msg), **kwargs)
|
self.send(':%s %s' % (self._expandPUID(source), msg), **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user