Trim trailing whitespace off RPL_NAMREPLY, this fixes usercount sometimes being 1 too high
This commit is contained in:
parent
e2fbac7f38
commit
58fe1c630a
@ -183,7 +183,7 @@ func (i *ircHandler) topic(msg *irc.Message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i *ircHandler) names(msg *irc.Message) {
|
func (i *ircHandler) names(msg *irc.Message) {
|
||||||
users := strings.Split(msg.Trailing, " ")
|
users := strings.Split(strings.TrimSuffix(msg.Trailing, " "), " ")
|
||||||
userBuffer := i.userBuffers[msg.Params[2]]
|
userBuffer := i.userBuffers[msg.Params[2]]
|
||||||
i.userBuffers[msg.Params[2]] = append(userBuffer, users...)
|
i.userBuffers[msg.Params[2]] = append(userBuffer, users...)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user