Skip to content
Extraits de code Groupes Projets
Valider 83bac755 rédigé par Loris TICHADOU's avatar Loris TICHADOU
Parcourir les fichiers

Update nardco.py

parent 8cd5358f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -49,6 +49,8 @@ pour = []
global suple
suple = -1
global cmdCarac
cmdCarac = "$"
......@@ -58,6 +60,11 @@ def isCommande(string):
global cmdCarac
return string[0] == cmdCarac
def no_hl(pseudo) :
ins = u'\u200C'.encode("utf-8")
return pseudo[0] + str(ins) + pseudo[1:]
class Boooob(ircbot.SingleServerIRCBot):
def __init__(self):
......@@ -246,13 +253,15 @@ class Boooob(ircbot.SingleServerIRCBot):
cleanlist = []
for f in liste :
if f[0] in ["~", "&", "@", "%", "+"] and 'nardco' not in f :
cleanlist.append(f[1:2] + "'" + f[2:] )
cleanlist.append(no_hl(f))
elif 'nardco' not in f :
cleanlist.append(f[:2] + "'" + f[2:])
cleanlist.append(no_hl(f))
live = cleanlist[:len(liste)//2]
dead = cleanlist[len(liste)//2 + 1 :]
serv.nick(dead[random.randint(0,len(dead) - 1)])
serv.privmsg(canal, "I don't feel so good mr {0}".format(live[random.randint(0,len(live) - 1)]))
pp = dead[random.randint(0,len(dead) - 1)]
ts = live[random.randint(0,len(live) - 1)]
serv.nick('{0}{1}_'.format(pp[0],pp[2:] )
serv.privmsg(canal, "I don't feel so good mr {0}{1}".format(ts[0],ts[2:])
serv.nick('nardco')
serv.privmsg(canal, "Vivants : {0}".format(", ".join(live) ))
serv.privmsg(canal, "Morts : {0}".format(", ".join(dead) ))
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter