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,6 +68,7 @@ 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:
if not chan == bot.nick:
bot.log( bot.log(
f"Channel not in channels ({chan} not in {bot.channels})", f"Channel not in channels ({chan} not in {bot.channels})",
"WARN", "WARN",