1
0
Fork 0
forked from External/ergo
This commit is contained in:
Shivaram Lingamneni 2020-02-06 17:43:54 -05:00
parent e71a3a57f0
commit a3f008e348
2 changed files with 10 additions and 8 deletions

View file

@ -955,6 +955,10 @@ func (client *Client) updateNick(nick, nickCasefolded, skeleton string) {
// updateNickMaskNoMutex updates the casefolded nickname and nickmask, not acquiring any mutexes.
func (client *Client) updateNickMaskNoMutex() {
if client.nick == "*" {
return // pre-registration, don't bother generating the hostname
}
client.hostname = client.getVHostNoMutex()
if client.hostname == "" {
client.hostname = client.cloakedHostname
@ -963,10 +967,6 @@ func (client *Client) updateNickMaskNoMutex() {
}
}
if client.hostname == "" {
return // pre-registration, don't bother generating the hostname
}
cfhostname := strings.ToLower(client.hostname)
client.nickMaskString = fmt.Sprintf("%s!%s@%s", client.nick, client.username, client.hostname)
client.nickMaskCasefolded = fmt.Sprintf("%s!%s@%s", client.nickCasefolded, strings.ToLower(client.username), cfhostname)