Change message to msg in relay output and in functions, include name in connection notifications instead of net
This commit is contained in:
parent
89894287b3
commit
ddadeb617c
19
core/bot.py
19
core/bot.py
|
@ -141,8 +141,8 @@ class IRCBot(IRCClient):
|
|||
cast["nick"], cast["ident"], cast["host"] = self.parsen(cast["muser"])
|
||||
#if not cast["type"] in ["nick", "kick", "quit", "part", "join"]:
|
||||
# del cast["muser"]
|
||||
if set(["nick", "ident", "host", "message"]).issubset(set(cast)):
|
||||
if "message" in cast.keys():
|
||||
if set(["nick", "ident", "host", "msg"]).issubset(set(cast)):
|
||||
if "msg" in cast.keys():
|
||||
if cast["ident"] == "znc" and cast["host"] == "znc.in":
|
||||
cast["type"] = "znc"
|
||||
cast["name"] = self.name
|
||||
|
@ -175,9 +175,9 @@ class IRCBot(IRCClient):
|
|||
castDup["name"] = self.name
|
||||
if not cast["target"].lower() == self.nickname.lower(): # modes has been set on us directly
|
||||
self.event(**castDup) # don't tell anyone else
|
||||
if "message" in cast.keys() and not cast["type"] == "query": # Don't highlight queries
|
||||
if not cast["message"] == None:
|
||||
if self.nickname.lower() in cast["message"].lower():
|
||||
if "msg" in cast.keys() and not cast["type"] == "query": # Don't highlight queries
|
||||
if not cast["msg"] == None:
|
||||
if self.nickname.lower() in cast["msg"].lower():
|
||||
castDup = deepcopy(cast)
|
||||
castDup["mtype"] = cast["type"]
|
||||
castDup["type"] = "highlight"
|
||||
|
@ -190,13 +190,13 @@ class IRCBot(IRCClient):
|
|||
monitor.event(self.name, cast)
|
||||
|
||||
def privmsg(self, user, channel, msg):
|
||||
self.event(type="msg", muser=user, target=channel, message=msg)
|
||||
self.event(type="msg", muser=user, target=channel, msg=msg)
|
||||
|
||||
def noticed(self, user, channel, msg):
|
||||
self.event(type="notice", muser=user, target=channel, message=msg)
|
||||
self.event(type="notice", muser=user, target=channel, msg=msg)
|
||||
|
||||
def action(self, user, channel, msg):
|
||||
self.event(type="action", muser=user, target=channel, message=msg)
|
||||
self.event(type="action", muser=user, target=channel, msg=msg)
|
||||
|
||||
def get(self, var):
|
||||
try:
|
||||
|
@ -379,7 +379,8 @@ class IRCBot(IRCClient):
|
|||
def signedOn(self):
|
||||
self.connected = True
|
||||
log("signed on: %s" % self.name)
|
||||
self.event(type="conn", status="connected")
|
||||
#self.event(type="conn", status="connected")
|
||||
sendRelayNotification({"type": "conn", "name": self.name, "status": "signedon"})
|
||||
|
||||
def joined(self, channel):
|
||||
if not channel in self.channels:
|
||||
|
|
Loading…
Reference in New Issue