aboutsummaryrefslogtreecommitdiff
path: root/irc.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-22 10:44:47 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-22 10:44:47 +0800
commit198ac6c2da289fef8d5927aa4d6d2dc435501a0d (patch)
treee69afe83dbd689fa03c8f1f7a00b4165409a2a3d /irc.go
parentBump dependencies (diff)
downloadforge-198ac6c2da289fef8d5927aa4d6d2dc435501a0d.tar.gz
forge-198ac6c2da289fef8d5927aa4d6d2dc435501a0d.tar.zst
forge-198ac6c2da289fef8d5927aa4d6d2dc435501a0d.zip
Only say test when self-joining
Diffstat (limited to 'irc.go')
-rw-r--r--irc.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/irc.go b/irc.go
index afc9f96..8fe22d1 100644
--- a/irc.go
+++ b/irc.go
@@ -65,6 +65,13 @@ func ircBotSession() error {
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