From d7c9b60144cdaa5875a9557ec15970b709e74f71 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sun, 14 Oct 2018 11:22:58 +0200 Subject: [PATCH] rate limit pour opensuze --- bots.yaml | 1 + klafirc/bot.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bots.yaml b/bots.yaml index 75762ba..70640bd 100644 --- a/bots.yaml +++ b/bots.yaml @@ -101,6 +101,7 @@ bots: - "Tu reprends de la soupe ?" on_match: "(Y|y|([Ii]l (n')?y)) en a plus" : "Y en a plus ? J'ai tout bu ?" + min_time: 3 # in seconds channels: - server: irc.rezometz.org diff --git a/klafirc/bot.py b/klafirc/bot.py index 832b9f2..94b5feb 100644 --- a/klafirc/bot.py +++ b/klafirc/bot.py @@ -87,7 +87,8 @@ class Bot: } result = [] for m in self.reactions.keys(): - if m.search(message): + search = m.search(message) + if search: r = self.reactions[m] if callable(r): r = r(self, username, channel, message)