OPER and DEOPER notices

Signed-off-by: Georg <georg@lysergic.dev>
This commit is contained in:
Georg Pfuetzenreuter 2021-08-29 00:13:44 +02:00
parent 9a035edef3
commit 14e7d4e74e
Signed by: Georg
GPG Key ID: 1DAF57F49F8E8F22

View File

@ -358,6 +358,26 @@ class SnoParser(callbacks.Plugin):
self._setvhost(irc, msg, account) self._setvhost(irc, msg, account)
self._sendSnotice(irc, msg, repl) self._sendSnotice(irc, msg, repl)
if 'OPER' in text and 'Client opered up' in text:
operregex = "^-OPER- Client opered up \[(.*)\]"
couple = re.match(operregex, text)
account = couple.group(1)
DictFromSnotice = {'notice': 'oper'}
repl = f"\x02\x1FNOTICE:\x0F [{account}] opered up."
self._sendSnotice(irc, msg, repl)
if 'OPER' in text and 'Client deopered' in text:
operregex = "^-OPER- Client deopered \[(.*)\]"
couple = re.match(operregex, text)
account = couple.group(1)
DictFromSnotice = {'notice': 'oper'}
repl = f"\x02\x1FNOTICE:\x0F [{account}] opered down."
self._sendSnotice(irc, msg, repl)
# Post Registration # Post Registration