From 72d0c8d9bce125be1b851b142b0f41242d496f6f Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 6 Apr 2025 01:24:58 +0800 Subject: irc: Factor the IRC stuff into its own package --- git_hooks_handle_other.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'git_hooks_handle_other.go') diff --git a/git_hooks_handle_other.go b/git_hooks_handle_other.go index d4a6aea..da40bb6 100644 --- a/git_hooks_handle_other.go +++ b/git_hooks_handle_other.go @@ -12,7 +12,6 @@ import ( "errors" "fmt" "io" - "log/slog" "net" "path/filepath" "strconv" @@ -226,11 +225,7 @@ func (s *Server) hooksHandler(conn net.Conn) { mergeRequestWebURL := fmt.Sprintf("%s/contrib/%d/", s.genHTTPRemoteURL(packPass.groupPath, packPass.repoName), newMRLocalID) fmt.Fprintln(sshStderr, ansiec.Blue+"Created merge request at", mergeRequestWebURL+ansiec.Reset) - select { - case s.ircSendBuffered <- "PRIVMSG #chat :New merge request at " + mergeRequestWebURL: - default: - slog.Error("IRC SendQ exceeded") - } + s.ircBot.Send("PRIVMSG #chat :New merge request at " + mergeRequestWebURL) } else { // Existing contrib branch var existingMRUser int var isAncestor bool -- cgit v1.2.3