u"B Y E, C R U E L _ O R L D!",
u"B Y E, C R U E L W O R L D!",
]
+config_leave_messages=["On finira la partie plus tard :p"]
def log(serveur,channel,auteur=None,message=None):
f=open(get_config_logfile(serveur),"a")
if auteur in self.ops and len(message)>1:
if message[1] in self.chanlist:
if not (message[1] in self.stay_channels) or auteur in self.overops:
- serv.part(message[1])
+ self.quitter(message[1]," ".join(message[2:]))
self.chanlist.remove(message[1])
log(self.serveur,"priv",auteur," ".join(message)+"[successful]")
else:
elif cmd in ["part","leave","dégage"]:
if auteur in self.ops and (not (canal in self.stay_channels)
or auteur in self.overops):
- serv.part(canal,message="Éjecté par %s"%(auteur))
+ self.quitter(canal)
log(self.serveur,canal,auteur,message+"[successful]")
if canal in self.chanlist:
self.chanlist.remove(canal)
return
mypseudo=serv.get_nickname()
+ def quitter(self,chan,leave_message=None):
+ if leave_message==None:
+ leave_message=random.choice(config_leave_messages)
+ self.serv.part(chan,leave_message.encode("utf8"))
+
def mourir(self):
quit_message=random.choice(config_quit_messages)
self.die(message=config_quit_message)