aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-04-03 01:16:36 +0200
committerRobin Jarry <robin@jarry.cc>2024-06-28 23:33:12 +0200
commit7f833baa90bf6521997c70557a1534dc7528ce0d (patch)
treee2906f6ac1c09d5a1844fd4b8308483c87234bad
parentd9cc599cac6b6e6dd785881d7220bd3a9eb61f18 (diff)
downloadaerc-7f833baa90bf6521997c70557a1534dc7528ce0d.tar.gz
ircbot: implement table unflipping
Some IRC users have a tendency to flip tables when they are upset. Improve our bot to put furniture back where it belongs. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
-rw-r--r--contrib/ircbot/Karma/plugin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/ircbot/Karma/plugin.py b/contrib/ircbot/Karma/plugin.py
index 70ebc87c..c82f0c7f 100644
--- a/contrib/ircbot/Karma/plugin.py
+++ b/contrib/ircbot/Karma/plugin.py
@@ -267,8 +267,14 @@ class Karma(callbacks.Plugin):
irc.noReply()
IRC_NICK = r'\w[\w\\`\[\]\{\}\^-]*'
+ TABLE_FLIP = re.compile(r'\s*[(\(]╯...[\))]╯\s*︵\s*.*', re.U)
def _doKarma(self, irc, msg, channel, line):
+ match = self.TABLE_FLIP.match(line)
+ if match:
+ irc.reply(f'┳━┳ノ(°_°ノ)')
+ return
+
inc = self.registryValue('incrementChars', channel, irc.network)
dec = self.registryValue('decrementChars', channel, irc.network)
onlynicks = self.registryValue('onlyNicks', channel, irc.network)