3
0
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:
James Lu 2016-07-29 00:56:14 -07:00
parent 3ad9362247
commit 2bc066bacb

View File

@ -417,6 +417,8 @@ 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
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'}])