Make NickServ detection casemapping-aware
This commit is contained in:
parent
3237bde9f3
commit
ecf35187fa
@ -1682,7 +1682,7 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if upstreamName == "NickServ" {
|
if uc.network.casemap(upstreamName) == "nickserv" {
|
||||||
dc.handleNickServPRIVMSG(uc, text)
|
dc.handleNickServPRIVMSG(uc, text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1734,14 +1734,14 @@ func (uc *upstreamConn) appendLog(entity string, msg *irc.Message) (msgID string
|
|||||||
if uc.user.msgStore == nil {
|
if uc.user.msgStore == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if entity == "NickServ" {
|
|
||||||
|
entityCM := uc.network.casemap(entity)
|
||||||
|
if entityCM == "nickserv" {
|
||||||
// The messages sent/received from NickServ may contain
|
// The messages sent/received from NickServ may contain
|
||||||
// security-related information (like passwords). Don't store these.
|
// security-related information (like passwords). Don't store these.
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
entityCM := uc.network.casemap(entity)
|
|
||||||
|
|
||||||
if !uc.network.delivered.HasTarget(entity) {
|
if !uc.network.delivered.HasTarget(entity) {
|
||||||
// This is the first message we receive from this target. Save the last
|
// 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
|
// message ID in delivery receipts, so that we can send the new message
|
||||||
|
Loading…
Reference in New Issue
Block a user