From: Vincent Le Gallic Date: Tue, 8 May 2012 21:21:26 +0000 (+0200) Subject: correction de la commande SOLDE sans paramètre X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=e88b88f053c9b007ef126c3ddf5c00f7c6baeb20;p=bots%2Fbasile.git correction de la commande SOLDE sans paramètre --- diff --git a/basile.py b/basile.py index bad7c8f..c9058c0 100755 --- a/basile.py +++ b/basile.py @@ -600,11 +600,12 @@ class Basile(ircbot.SingleServerIRCBot): if len(message)==1: if self.identities.has_key(auteur): try: - self.nk.write('search ["x",["pseudo"],%s]'%(json.dumps(auteur))) + self.nk.write('search ["x",["pseudo"],%s]'%(json.dumps(self.identities[auteur]))) ret=json.loads(self.nk.read()) solde=ret["msg"][0]["solde"] pseudo=ret["msg"][0]["pseudo"] except Exception as exc: + print exc serv.privmsg(auteur,"failed") log(self.serveur,"priv",auteur," ".join(message)+"[failed]") return diff --git a/identities.pickle b/identities.pickle index fa6eaea..593affe 100644 --- a/identities.pickle +++ b/identities.pickle @@ -1,10 +1,14 @@ (dp0 -S'[20-100]' +S'quelu' p1 -S'20-100' +S'quelu' p2 -sS'PEB' +sS'[20-100]' p3 -S'peb' +S'20-100' p4 +sS'PEB' +p5 +S'peb' +p6 s. \ No newline at end of file