From c51569420abac5351e2f6222b213d3129af27fb4 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 29 Nov 2021 02:14:16 -0500 Subject: [PATCH] fix #1844 Send snomasks for HS SET --- irc/hostserv.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/irc/hostserv.go b/irc/hostserv.go index 86ddf760..fedfbbea 100644 --- a/irc/hostserv.go +++ b/irc/hostserv.go @@ -10,6 +10,7 @@ import ( "github.com/ergochat/irc-go/ircfmt" + "github.com/ergochat/ergo/irc/sno" "github.com/ergochat/ergo/irc/utils" ) @@ -159,6 +160,7 @@ func validateVhost(server *Server, vhost string, oper bool) error { } func hsSetHandler(service *ircService, server *Server, client *Client, command string, params []string, rb *ResponseBuffer) { + oper := client.Oper() user := params[0] var vhost string @@ -176,8 +178,10 @@ func hsSetHandler(service *ircService, server *Server, client *Client, command s service.Notice(rb, client.t("An error occurred")) } else if vhost != "" { service.Notice(rb, client.t("Successfully set vhost")) + server.snomasks.Send(sno.LocalVhosts, fmt.Sprintf("Operator %s set vhost %s on account %s", oper.Name, user, vhost)) } else { service.Notice(rb, client.t("Successfully cleared vhost")) + server.snomasks.Send(sno.LocalVhosts, fmt.Sprintf("Operator %s cleared vhost on account %s", oper.Name, user)) } }