]> gitweb.pimeys.fr Git - bots/basile.git/blobdiff - basile.py
int != str
[bots/basile.git] / basile.py
index 359c75f951b76a4fcc79800e0788c48dcfd5eeac..60df8132bad45add5e42a65a67f921c26692e072 100755 (executable)
--- a/basile.py
+++ b/basile.py
@@ -724,14 +724,14 @@ class Basile(ircbot.SingleServerIRCBot):
             if re.match("ma bite dans ton oreille",message) and not canal in self.quiet_channels:
                 serv.privmsg(canal,"%s: Seul un olasd peut imiter un olasd dans un de ses grands jours !"%(auteur))
             if out and not canal in self.quiet_channels:
-                out=out.groups()[0]
+                out = out.groups()[0]
                 try:
-                    out=int(out)
-                    serv.privmsg(canal,"%s: %s !"%(auteur,out+1))
-                    if out==2147483647:
-                        serv.privmsg(canal,"%s: Ciel, un maxint ! Heureusement que je suis en python…"%(auteur))
+                    iout = int(out)
+                    serv.privmsg(canal,"%s: %s !"%(auteur, iout + 1))
+                    if iout == 2147483647:
+                        serv.privmsg(canal,"%s: Ciel, un maxint ! Heureusement que je suis en python…" % (auteur))
                         return
-                    if out+1>1000 and random.randrange(4)==0:
+                    if iout + 1 > 1000 and random.randrange(4)==0:
                         serv.privmsg(canal,"%s: Vous savez, moi et les chiffres…"%(auteur))
                         return
                 except Exception as exc: