|
|
|
@ -83,26 +83,41 @@ class IRCBot(IRCClient):
|
|
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
if config["HighlightNotifications"]:
|
|
|
|
|
msgLower = msg.lower()
|
|
|
|
|
if self.nickname.lower() in msgLower:
|
|
|
|
|
msgLower = msgLower.replace(self.nickname, "{"+self.nickname+"}")
|
|
|
|
|
helper.sendMaster("NICK PRV %s (T:%s): (%s/%s) %s" % (self.name, msg.count(self.nickname), user, channel, msgLower))
|
|
|
|
|
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:
|
|
|
|
|
if self.name == config["Master"][0] and channel == config["Master"][1]:
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|
if config["HighlightNotifications"]:
|
|
|
|
|
msgLower = msg.lower()
|
|
|
|
|
if self.nickname.lower() in msgLower:
|
|
|
|
|
msgLower = msgLower.replace(self.nickname, "{"+self.nickname+"}")
|
|
|
|
|
helper.sendMaster("NICK NOT %s (T:%s): (%s/%s) %s" % (self.name, msg.count(self.nickname), user, channel, msgLower))
|
|
|
|
|
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:
|
|
|
|
|
if self.name == config["Master"][0] and channel == config["Master"][1]:
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|
if config["HighlightNotifications"]:
|
|
|
|
|
msgLower = msg.lower()
|
|
|
|
|
if self.nickname.lower() in msgLower:
|
|
|
|
|
msgLower = msgLower.replace(self.nickname, "{"+self.nickname+"}")
|
|
|
|
|
helper.sendMaster("NICK ACT %s (T:%s): (%s/%s) %s" % (self.name, msg.count(self.nickname), user, channel, msgLower))
|
|
|
|
|
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 get(self, var):
|
|
|
|
|