From: Vincent Le Gallic Date: Fri, 14 Jun 2013 01:11:55 +0000 (+0200) Subject: Parenthésage des messages de log pour [success]/[failed] X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=8cb452a9ceee8ad9acb83ea8f7670076d1c968af;p=bots%2Fbasile.git Parenthésage des messages de log pour [success]/[failed] --- diff --git a/basile.py b/basile.py index 70de88f..cd03e92 100755 --- a/basile.py +++ b/basile.py @@ -314,7 +314,7 @@ class Basile(ircbot.SingleServerIRCBot): if irclib.is_channel(place): message = "%s: %s" % (auteur, message.encode("utf-8")) self.serv.privmsg(place, message) - log(self.serveur, place, auteur, something + "%r" % params + "[successful]" if success else "[failed]") + log(self.serveur, place, auteur, something + "%r" % params + ("[successful]" if success else "[failed]")) ### Surcharge des events du Bot def on_welcome(self, serv, ev): @@ -560,7 +560,7 @@ class Basile(ircbot.SingleServerIRCBot): success, solde, pseudo = nk.get_solde(self.nk, self.identities[auteur]["idbde"], serv, auteur) if success: serv.privmsg(auteur, "%s (%s)" % (float(solde)/100, pseudo.encode("utf8"))) - log(self.serveur, "priv", auteur, " ".join(message) + "[successful]" if success else "[failed]") + log(self.serveur, "priv", auteur, " ".join(message) + ("[successful]" if success else "[failed]")) else: serv.privmsg(canal, "Je ne connais pas ton pseudo note.") elif cmd == u"ops":