3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

classes: add special PYLINK_SELF(PRIVMSG/NOTICE) hooks for command loopback

This commit is contained in:
James Lu 2015-09-26 09:56:10 -07:00
parent 034731ab1e
commit 97a135a6f1

View File

@ -194,8 +194,11 @@ class Irc():
source = source or self.pseudoclient.uid
if notice:
self.proto.noticeClient(source, target, text)
cmd = 'PYLINK_SELF_NOTICE'
else:
self.proto.messageClient(source, target, text)
cmd = 'PYLINK_SELF_PRIVMSG'
self.callHooks([source, cmd, {'target': target, 'text': text}])
def _disconnect(self):
log.debug('(%s) Canceling pingTimer at %s due to _disconnect() call', self.name, time.time())