Make NickServ detection casemapping-aware

This commit is contained in:
Simon Ser 2021-03-30 12:28:45 +02:00
parent 3237bde9f3
commit ecf35187fa
2 changed files with 4 additions and 4 deletions

View File

@ -1682,7 +1682,7 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
return err
}
if upstreamName == "NickServ" {
if uc.network.casemap(upstreamName) == "nickserv" {
dc.handleNickServPRIVMSG(uc, text)
}

View File

@ -1734,14 +1734,14 @@ func (uc *upstreamConn) appendLog(entity string, msg *irc.Message) (msgID string
if uc.user.msgStore == nil {
return ""
}
if entity == "NickServ" {
entityCM := uc.network.casemap(entity)
if entityCM == "nickserv" {
// The messages sent/received from NickServ may contain
// security-related information (like passwords). Don't store these.
return ""
}
entityCM := uc.network.casemap(entity)
if !uc.network.delivered.HasTarget(entity) {
// This is the first message we receive from this target. Save the last
// message ID in delivery receipts, so that we can send the new message