From 5c79e1e1a3ec086207083b7981bc919104301eb6 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Tue, 14 Nov 2023 15:42:23 -0600 Subject: [PATCH] Suppress warning if it's a DM to the bot --- handlers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/handlers.py b/handlers.py index 7f80d30..0f3d898 100644 --- a/handlers.py +++ b/handlers.py @@ -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})") return None, None elif chan not in bot.channels: - bot.log( - f"Channel not in channels ({chan} not in {bot.channels})", - "WARN", - ) + if not chan == bot.nick: + bot.log( + f"Channel not in channels ({chan} not in {bot.channels})", + "WARN", + ) if not chan.startswith(("#", "+", "&")): chan = name else: