diff --git a/threshold b/threshold index c1795aa..e2daafe 100755 --- a/threshold +++ b/threshold @@ -67,21 +67,6 @@ class IRCBot(IRCClient): else: self.password = instance["password"] - def privmsg(self, user, channel, msg): - toSend = helper.isKeyword(msg) - if toSend: - helper.sendMaster("MATCH PRV %s (U:%s T:%s): (%s/%s) %s" % (self.name, toSend[1], toSend[2], user, channel, toSend[0])) - - def noticed(self, user, channel, msg): - toSend = helper.isKeyword(msg) - if toSend: - helper.sendMaster("MATCH NOT %s (U:%s T:%s): (%s/%s) %s" % (self.name, toSend[1], toSend[2], user, channel, toSend[0])) - - def action(self, user, channel, msg): - toSend = helper.isKeyword(msg) - if toSend: - helper.sendMaster("MATCH ACT %s (U:%s T:%s): (%s/%s) %s" % (self.name, toSend[1], toSend[2], user, channel, toSend[0])) - def refresh(self): instance = pool[self.name] if not instance["nickname"] == self.nickname: @@ -95,6 +80,30 @@ class IRCBot(IRCClient): self.versionEnv = None self.sourceURL = instance["source"] + def privmsg(self, user, channel, msg): + toSend = helper.isKeyword(msg) + if toSend: + if self.name == config["Master"][0] and channel == config["Master"][1]: + pass + else: + helper.sendMaster("MATCH PRV %s (U:%s T:%s): (%s/%s) %s" % (self.name, toSend[1], toSend[2], user, channel, toSend[0])) + + def noticed(self, user, channel, msg): + toSend = helper.isKeyword(msg) + if toSend: + if self.name == config["Master"][0] and channel == config["Master"][1]: + pass + else: + helper.sendMaster("MATCH NOT %s (U:%s T:%s): (%s/%s) %s" % (self.name, toSend[1], toSend[2], user, channel, toSend[0])) + + def action(self, user, channel, msg): + toSend = helper.isKeyword(msg) + if toSend: + if self.name == config["Master"][0] and channel == config["Master"][1]: + pass + else: + helper.sendMaster("MATCH ACT %s (U:%s T:%s): (%s/%s) %s" % (self.name, toSend[1], toSend[2], user, channel, toSend[0])) + def get(self, var): try: result = getattr(self, var)