# Process persistant hooks. if not self.hook(const.LOC_EV_CHAT, user, status): return def ev_dnd(self, user, status): # Process persistant hooks. if not self.hook(const.LOC_EV_DND, user, status): return def ev_xa(self, user, status): # Process persistant hooks. if not self.hook(const.LOC_EV_XA, user, status): return if __name__ == '__main__': me = ConferenceBot() me.prep() me.setOnline() #Add any new users. #for i in me.getRoster(): # i = getjid(i) # if i not in userlist.keys(): # adduser(getname(i)) utils.debug('core', "The bot is now online!\nRunning version: %s\nAt %s" % ( utils.get_svn_revision(), time.strftime("%Y-%m-%d %H:%M:%S") )) me.run()
@attach_hooks() def ev_dnd(self, pres): # Process persistant hooks. if self.hook(const.LOC_EV_DND, pres): return @attach_hooks() def ev_xa(self, pres): # Process persistant hooks. if self.hook(const.LOC_EV_XA, pres): return if __name__ == '__main__': me = ConferenceBot() me.prep() me.setOnline() #Add any new users. #for i in me.getRoster(): # i = getjid(i) # if i not in userlist.keys(): # adduser(getname(i)) #utils.debug('core', "The bot is now online!\nRunning version: %s\nAt %s" % ( # utils.get_svn_revision(), time.strftime("%Y-%m-%d %H:%M:%S") # )) logging.getLogger('pygab').info("The %s module is now online!" % utils.get_module()) logging.getLogger('pygab').info("Running version: %s" % utils.get_svn_revision()) me.run()