mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-14 07:59:31 +01:00
commit
d4dd161c45
@ -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
|
||||||
|
@ -113,7 +113,16 @@ func doImportDBGeneric(config *Config, dbImport databaseImport, credsType Creden
|
|||||||
tx.Set(fmt.Sprintf(keyAccountCredentials, cfUsername), string(marshaledCredentials), nil)
|
tx.Set(fmt.Sprintf(keyAccountCredentials, cfUsername), string(marshaledCredentials), nil)
|
||||||
tx.Set(fmt.Sprintf(keyAccountRegTime, cfUsername), strconv.FormatInt(userInfo.RegisteredAt, 10), nil)
|
tx.Set(fmt.Sprintf(keyAccountRegTime, cfUsername), strconv.FormatInt(userInfo.RegisteredAt, 10), nil)
|
||||||
if userInfo.Vhost != "" {
|
if userInfo.Vhost != "" {
|
||||||
tx.Set(fmt.Sprintf(keyAccountVHost, cfUsername), userInfo.Vhost, nil)
|
vhinfo := VHostInfo{
|
||||||
|
Enabled: true,
|
||||||
|
ApprovedVHost: userInfo.Vhost,
|
||||||
|
}
|
||||||
|
vhBytes, err := json.Marshal(vhinfo)
|
||||||
|
if err == nil {
|
||||||
|
tx.Set(fmt.Sprintf(keyAccountVHost, cfUsername), string(vhBytes), nil)
|
||||||
|
} else {
|
||||||
|
log.Printf("couldn't serialize vhost for %s: %v\n", username, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if len(userInfo.AdditionalNicks) != 0 {
|
if len(userInfo.AdditionalNicks) != 0 {
|
||||||
tx.Set(fmt.Sprintf(keyAccountAdditionalNicks, cfUsername), marshalReservedNicks(userInfo.AdditionalNicks), nil)
|
tx.Set(fmt.Sprintf(keyAccountAdditionalNicks, cfUsername), marshalReservedNicks(userInfo.AdditionalNicks), nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user