From: Vincent Le Gallic Date: Mon, 14 Apr 2014 07:03:12 +0000 (+0200) Subject: +, virgule et %s pas rempli X-Git-Url: http://gitweb.pimeys.fr/?p=bots%2Fparrot.git;a=commitdiff_plain;h=429401c797769a35ad0c6310e81f03f161e198ff +, virgule et %s pas rempli --- diff --git a/parrot.py b/parrot.py index 6229e8d..0c4006f 100755 --- a/parrot.py +++ b/parrot.py @@ -453,11 +453,11 @@ class Parrot(ircbot.SingleServerIRCBot): search = u" ".join(words[1:]) authors = self.quotedb.search_authors(search, regexp) if len(authors) > config.search_max_authors: - authors = authors[:config.search_max_authors+1] + [unicode(len(authors) - config.search_max_authors)] + authors = authors[:config.search_max_authors+1] + ["+%s" % (len(authors) - config.search_max_authors)] if authors: - serv.privmsg(canal, "%s: %s" % (auteur, (u" ".join(authors)).encode("utf-8"))) + serv.privmsg(canal, "%s: %s" % (auteur, (u", ".join(authors)).encode("utf-8"))) else: - serv.privmsg(canal, "%s: Pas d'auteur correspondant à la recherche.") + serv.privmsg(canal, "%s: Pas d'auteur correspondant à la recherche." % (auteur,)) def on_action(self, serv, ev): """À la réception d'une action."""