From d67beed783fceb4de115edb6ab907633c88d3a76 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Tue, 8 Apr 2014 02:25:04 +0200 Subject: [PATCH] =?utf8?q?trigger=20display=20:=20donner=20l'url=20o=C3=B9?= =?utf8?q?=20les=20quotes=20sont=20dispo?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- config.py | 3 +++ parrot.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/config.py b/config.py index d714169..25347ca 100644 --- a/config.py +++ b/config.py @@ -130,3 +130,6 @@ quote_file = u"quotes.json" #: Fichier pour exporter les quotes quote_dump_file = u"quotes.txt" + +#: URL où sont disponibles les quotes +quote_display_url = u"http://cerebro.crans.org/parrot-quotes.txt (campus-only)" diff --git a/parrot.py b/parrot.py index 17a24a0..489ffbf 100755 --- a/parrot.py +++ b/parrot.py @@ -421,6 +421,8 @@ class Parrot(ircbot.SingleServerIRCBot): self.dump(asked_by=auteur, asked_where=canal) elif cmd in [u"restore"] and auteur in self.overops: self.restore(asked_by=auteur, asked_where=canal) + elif cmd in [u"display"]: + self.serv.privmsg(canal, "%s: %s" % (auteur, config.quote_display_url.encode("utf-8"))) else: # Vu que ce bot est prévu pour parser des quotes il va falloir bosser ici match = quote_pattern.match(message) -- 2.39.2