diff --git a/downstream.go b/downstream.go index f02e384..3fa4ccc 100644 --- a/downstream.go +++ b/downstream.go @@ -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) } diff --git a/upstream.go b/upstream.go index 82bd3b6..064ce2b 100644 --- a/upstream.go +++ b/upstream.go @@ -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