mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-23 10:44:09 +01:00
clientbot: don't send duplicate operups (#289)
This commit is contained in:
parent
3ad9362247
commit
2bc066bacb
@ -417,9 +417,11 @@ class ClientbotWrapperProtocol(Protocol):
|
||||
log.warning('(%s) handle_352: got wrong string %s for away status', self.irc.name, status[0])
|
||||
|
||||
if '*' in status: # Track IRCop status
|
||||
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'}])
|
||||
if not self.irc.isOper(uid, allowAuthed=False):
|
||||
# Don't send duplicate oper ups if the target is already oper.
|
||||
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'}])
|
||||
elif self.irc.isOper(uid, allowAuthed=False) and not self.irc.isInternalClient(uid):
|
||||
# Track deopers
|
||||
self.irc.applyModes(uid, [('-o', None)])
|
||||
|
Loading…
Reference in New Issue
Block a user