3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-11 06:29:29 +01:00

make overridden services hostname appear in chanserv

This commit is contained in:
Shivaram Lingamneni 2020-12-07 02:15:44 -05:00
parent 8c2d0762e4
commit da2d4ca130

View File

@ -3262,11 +3262,16 @@ func whoisHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res
handleService := func(nick string) bool { handleService := func(nick string) bool {
cfnick, _ := CasefoldName(nick) cfnick, _ := CasefoldName(nick)
service, ok := OragonoServices[cfnick] service, ok := OragonoServices[cfnick]
hostname := "localhost"
config := server.Config()
if config.Server.OverrideServicesHostname != "" {
hostname = config.Server.OverrideServicesHostname
}
if !ok { if !ok {
return false return false
} }
clientNick := client.Nick() clientNick := client.Nick()
rb.Add(nil, client.server.name, RPL_WHOISUSER, clientNick, service.Name, service.Name, "localhost", "*", fmt.Sprintf(client.t("Network service, for more info /msg %s HELP"), service.Name)) rb.Add(nil, client.server.name, RPL_WHOISUSER, clientNick, service.Name, service.Name, hostname, "*", fmt.Sprintf(client.t("Network service, for more info /msg %s HELP"), service.Name))
// #1080: // #1080:
rb.Add(nil, client.server.name, RPL_WHOISOPERATOR, clientNick, service.Name, client.t("is a network service")) rb.Add(nil, client.server.name, RPL_WHOISOPERATOR, clientNick, service.Name, client.t("is a network service"))
// hehe // hehe