def troll_jid(self, undo, jid): jid = strip_jid(jid) if undo: if jid in self.troll["jid"]: index = self.troll["jid"].index(jid) del self.troll["jid"][index] elif not jid in self.troll["jid"]: self.troll["jid"] += [jid] self.commit()
def autokick_jid(self, undo, jid): jid = strip_jid(jid) if undo: if jid in self.autokick["jid"]: index = self.autokick["jid"].index(jid) del self.autokick["jid"][index] elif not jid in self.autokick["jid"]: self.autokick["jid"] += [jid] self.commit()
def troll_jid(self, undo, jid): jid = strip_jid(jid) if undo: if jid in self.troll["jid"]: index = self.troll["jid"].index(jid) del self.troll["jid"][index] elif not jid in self.troll["jid"]: self.troll["jid"] += [ jid ] self.commit()
def autokick_jid(self, undo, jid): jid = strip_jid(jid) if undo: if jid in self.autokick["jid"]: index = self.autokick["jid"].index(jid) del self.autokick["jid"][index] elif not jid in self.autokick["jid"]: self.autokick["jid"] += [ jid ] self.commit()
def muc_msg(self, nick, jid, **keywords): jid = strip_jid(jid) if nick in self.troll["nick"]: self.do_troll(nick) elif jid in self.troll["jid"]: self.do_troll(nick)
def muc_online(self, nick, jid, **keywords): jid = strip_jid(jid) if nick in self.autokick["nick"]: self.kick(nick, "autokick") elif jid in self.autokick["jid"]: self.kick(nick, "autokick")