3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 19:52:53 +01:00

clientbot: fix oper tracking, add deoper tracking

Closes #289.
This commit is contained in:
James Lu 2016-07-29 00:54:47 -07:00
parent 6bc3191077
commit 3ad9362247

View File

@ -418,8 +418,12 @@ class ClientbotWrapperProtocol(Protocol):
if '*' in status: # Track IRCop status if '*' in status: # Track IRCop status
self.irc.applyModes(uid, [('+o', None)]) self.irc.applyModes(uid, [('+o', None)])
self.irc.callHooks([uid, 'MODE', {'target': uid, 'modes': {('+o', None)}}])
self.irc.callHooks([uid, 'CLIENT_OPERED', {'text': 'IRC Operator'}]) self.irc.callHooks([uid, 'CLIENT_OPERED', {'text': 'IRC Operator'}])
#else: # TODO: track de-opers as well elif self.irc.isOper(uid, allowAuthed=False) and not self.irc.isInternalClient(uid):
# Track deopers
self.irc.applyModes(uid, [('-o', None)])
self.irc.callHooks([uid, 'MODE', {'target': uid, 'modes': {('-o', None)}}])
self.who_received.add(uid) self.who_received.add(uid)