From 198ac6c2da289fef8d5927aa4d6d2dc435501a0d Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 22 Mar 2025 10:44:47 +0800 Subject: [PATCH] Only say test when self-joining --- irc.go | 7 +++++++ diff --git a/irc.go b/irc.go index afc9f965b6d99a0641ce6a209f836b49b0c3e159..8fe22d1200f716285fae85da08fee7478152f77f 100644 --- a/irc.go +++ b/irc.go @@ -65,6 +65,13 @@ readLoopError <- err return } case "JOIN": + c, ok := msg.Source.(irc.Client) + if !ok { + clog.Error("IRC server told us a non-client is joining a channel...") + } + if c.Nick != config.IRC.Nick { + continue + } _, err = conn.WriteString("PRIVMSG #chat :test\r\n") if err != nil { readLoopError <- err -- 2.48.1