diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-22 10:51:56 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-22 10:51:56 +0800 |
commit | 19938778354b8d8672ea030450bd8e4609fafb48 (patch) | |
tree | 5ef8e16ed78c5e1842575eab14841098356c67c6 | |
parent | Send IRC message when receiving merge requests (diff) | |
download | forge-19938778354b8d8672ea030450bd8e4609fafb48.tar.gz forge-19938778354b8d8672ea030450bd8e4609fafb48.tar.zst forge-19938778354b8d8672ea030450bd8e4609fafb48.zip |
Handle error when doing NICK/USER
-rw-r--r-- | irc.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -32,10 +32,13 @@ func ircBotSession() error { defer underlyingConn.Close() conn := irc.NewConn(underlyingConn) - conn.WriteString( + _, err = conn.WriteString( "NICK " + config.IRC.Nick + "\r\n" + "USER " + config.IRC.User + " 0 * :" + config.IRC.Gecos + "\r\n", ) + if err != nil { + return err + } readLoopError := make(chan error) writeLoopAbort := make(chan struct{}) |