for c in self.play_channels:
token=time.time()-3600
self.play_status[c]=[0,token]
- serv.execute_delayed(random.randrange(config.ttrig),self.start_enigme,(serv,c,token))
+ if config.auto_trigger:
+ serv.execute_delayed(random.randrange(config.ttrig),self.start_enigme,(serv,c,token))
def start_enigme(self,serv,channel,token=None):
# On reste silencieux si lechan n'est pas actif
if not self.is_active(channel):
- serv.execute_delayed(config.ttrig*5,self.start_enigme,(serv,channel,token))
+ if config.auto_trigger:
+ serv.execute_delayed(config.ttrig*5,self.start_enigme,(serv,channel,token))
return
if self.play_status[channel][0]==0 and channel in self.play_channels:
ok="skip"
serv.privmsg(channel,"C'était le %s"%(date).encode("utf8"))
token=time.time()
self.play_status[channel]=[0,token]
- serv.execute_delayed(random.randrange(config.Ttrig*5,config.Ttrig*10),self.start_enigme,(serv,channel,token))
+ if config.auto_trigger:
+ serv.execute_delayed(random.randrange(config.Ttrig*5,config.Ttrig*10),self.start_enigme,(serv,channel,token))
def get_enigme(self):
# on récupère les dates
self.add_score(auteur,score_obtenu)
token=time.time()
self.play_status[canal]=[0,token]
- serv.execute_delayed(random.randrange(config.Ttrig*5,config.Ttrig*10),self.start_enigme,(serv,canal,token))
+ if config.auto_trigger:
+ serv.execute_delayed(random.randrange(config.Ttrig*5,config.Ttrig*10),self.start_enigme,(serv,canal,token))
def on_kick(self,serv,ev):
auteur = irclib.nm_to_n(ev.source())