for c in self.chanlist:
log(self.serveur,"JOIN %s"%(c))
serv.join(c)
- self.update_activity(c,force=True)
for c in self.play_channels:
token=time.time()-3600
self.play_status[c]=[0,token]
if force or (not pseudo in config.idle_bots and all([not re.match(ignore, message) for ignore in config.idle_messages])):
self.last_activity[canal]=time.time()
def is_active(self,canal):
- return time.time()-self.last_activity[canal]<config.idle_time
+ # Si on n'a pas d'info sur le chan, il est inactif
+ return time.time()-self.last_activity.get(canal, config.idle_time)<config.idle_time
def reload(self, auteur=None):
reload(config)