summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg2021-08-29 00:13:44 +0200
committerGeorg2021-08-29 00:13:44 +0200
commit14e7d4e74e77ee92b55e5c117d7e17477b83ef8a (patch)
treee0a365e24169c945cdf9fcbbf7ec00b183c069af
parent9a035edef35d10d5c477a2ec7660d0c69e96729a (diff)
downloadsnoparser-14e7d4e74e77ee92b55e5c117d7e17477b83ef8a.tar.gz
snoparser-14e7d4e74e77ee92b55e5c117d7e17477b83ef8a.tar.bz2
snoparser-14e7d4e74e77ee92b55e5c117d7e17477b83ef8a.zip
OPER and DEOPER notices
Signed-off-by: Georg <georg@lysergic.dev>
-rw-r--r--plugin.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugin.py b/plugin.py
index 1adf2ef..cf2e05c 100644
--- a/plugin.py
+++ b/plugin.py
@@ -358,6 +358,26 @@ class SnoParser(callbacks.Plugin):
self._setvhost(irc, msg, account)
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