Fix query handling and don't send a fake message

This commit is contained in:
2022-08-15 17:59:31 +01:00
parent e4c1d80250
commit 0b69893e17
2 changed files with 13 additions and 5 deletions

View File

@@ -272,7 +272,7 @@ class IRCBot(IRCClient):
hostmask = us[0]
else:
# Close enough...
hostmask = f"{self.nickname}!*@{self.servername}"
hostmask = f"{self.nickname}!{self.nickname}@{self.servername}"
warn(f"Could not get a hostname, using {hostmask}")
nick, ident, host = parsen(hostmask)
# We sent someone a query reply
@@ -280,7 +280,7 @@ class IRCBot(IRCClient):
self.event(type="self", mtype="msg", channel=self.nickname, nick=channel, ident=ident, host=host, msg=msg)
else:
self.event(type="self", mtype="msg", channel=channel, nick=self.nickname, ident=ident, host=host, msg=msg)
self.event(type="msg", channel=channel, nick=self.nickname, ident=ident, host=host, msg=msg)
# self.event(type="msg", channel=channel, nick=self.nickname, ident=ident, host=host, msg=msg)
self.msg(channel, msg)
def get(self, var):