Suppress warning if it's a DM to the bot

This commit is contained in:
Firepup Sixfifty 2023-11-14 15:42:23 -06:00
parent 3098bc8ccf
commit 5c79e1e1a3
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA

View file

@ -68,10 +68,11 @@ def PRIVMSG(bot: bare.bot, msg: str) -> tuple[Union[None, str], Union[None, str]
bot.log(f"Name too long ({len(name)} > {bot.nicklen})") bot.log(f"Name too long ({len(name)} > {bot.nicklen})")
return None, None return None, None
elif chan not in bot.channels: elif chan not in bot.channels:
bot.log( if not chan == bot.nick:
f"Channel not in channels ({chan} not in {bot.channels})", bot.log(
"WARN", f"Channel not in channels ({chan} not in {bot.channels})",
) "WARN",
)
if not chan.startswith(("#", "+", "&")): if not chan.startswith(("#", "+", "&")):
chan = name chan = name
else: else: