def fetch_status(self): new_status = nplstatus() if self.npl_status is not None and new_status != self.npl_status: if new_status: self.bot.privmsg(self.target_channel, 'NPL-Registrations are now open!') else: self.bot.privmsg(self.target_channel, 'NPL-Registrations are now closed!') self.npl_status = new_status
def nplstatus(self, mask, target, args): '''check Teamspeak3 NPL-Registration-status %%nplstatus ''' if self.npl_status is None: self.npl_status = nplstatus() if self.npl_status: return 'NPL-Registrations are currently open!' else: return 'NPL-Registrations are currently closed!'