def login_NK(username,password,typ="bdd"):
sock=connect_NK()
+ if typ=="special": # ça c'est pour Basile lui-même
+ masque='["note"]'
+ elif typ=="bdd":
+ masque='[["all"],["all"],false]'
try:
# Basile a un compte special user
- commande='login [%s,%s,"%s",[["note"],[],false]]'%(json.dumps(username),json.dumps(password),typ)
+ commande='login [%s,%s,"%s",%s]'%(json.dumps(username),json.dumps(password),typ,masque)
sock.write(commande)
out=sock.read()
except Exception as exc:
try:
test=bot_unicode(message)
except UnicodeBotError:
- serv.privmsg(canal,
- "%s: Euh, tu fais de la merde avec ton encodage là, j'ai failli crasher…"%(auteur))
- return
+ if not canal in self.quiet_channels:
+ serv.privmsg(canal,
+ "%s: Euh, tu fais de la merde avec ton encodage là, j'ai failli crasher…"%(auteur))
+ return
pour_moi,message=self.pourmoi(serv,message)
if pour_moi and message.split()!=[]:
cmd=message.split()[0].lower()