From 58fe1c630aadaef77fda3d06149bbd2ea34eb2ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Mon, 1 Feb 2016 00:14:24 +0100 Subject: [PATCH] Trim trailing whitespace off RPL_NAMREPLY, this fixes usercount sometimes being 1 too high --- server/irc_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/irc_handler.go b/server/irc_handler.go index a9d9a0b0..56e3ca86 100644 --- a/server/irc_handler.go +++ b/server/irc_handler.go @@ -183,7 +183,7 @@ func (i *ircHandler) topic(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]] i.userBuffers[msg.Params[2]] = append(userBuffer, users...) }