mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-15 08:29:31 +01:00
parent
20270aeb22
commit
c51569420a
@ -10,6 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/ergochat/irc-go/ircfmt"
|
"github.com/ergochat/irc-go/ircfmt"
|
||||||
|
|
||||||
|
"github.com/ergochat/ergo/irc/sno"
|
||||||
"github.com/ergochat/ergo/irc/utils"
|
"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) {
|
func hsSetHandler(service *ircService, server *Server, client *Client, command string, params []string, rb *ResponseBuffer) {
|
||||||
|
oper := client.Oper()
|
||||||
user := params[0]
|
user := params[0]
|
||||||
var vhost string
|
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"))
|
service.Notice(rb, client.t("An error occurred"))
|
||||||
} else if vhost != "" {
|
} else if vhost != "" {
|
||||||
service.Notice(rb, client.t("Successfully set 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 {
|
} else {
|
||||||
service.Notice(rb, client.t("Successfully cleared vhost"))
|
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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user