mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
classes: add special PYLINK_SELF(PRIVMSG/NOTICE) hooks for command loopback
This commit is contained in:
parent
034731ab1e
commit
97a135a6f1
@ -194,8 +194,11 @@ class Irc():
|
|||||||
source = source or self.pseudoclient.uid
|
source = source or self.pseudoclient.uid
|
||||||
if notice:
|
if notice:
|
||||||
self.proto.noticeClient(source, target, text)
|
self.proto.noticeClient(source, target, text)
|
||||||
|
cmd = 'PYLINK_SELF_NOTICE'
|
||||||
else:
|
else:
|
||||||
self.proto.messageClient(source, target, text)
|
self.proto.messageClient(source, target, text)
|
||||||
|
cmd = 'PYLINK_SELF_PRIVMSG'
|
||||||
|
self.callHooks([source, cmd, {'target': target, 'text': text}])
|
||||||
|
|
||||||
def _disconnect(self):
|
def _disconnect(self):
|
||||||
log.debug('(%s) Canceling pingTimer at %s due to _disconnect() call', self.name, time.time())
|
log.debug('(%s) Canceling pingTimer at %s due to _disconnect() call', self.name, time.time())
|
||||||
|
Loading…
Reference in New Issue
Block a user