From 8eee127e4d39630195bb174d912ca0ea759bd0f3 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 26 May 2020 23:51:28 +0100 Subject: [PATCH] don't add trailing = to ISUPPORT tokens when value is empty string --- irc/isupport/list.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irc/isupport/list.go b/irc/isupport/list.go index 61215e54..9f3e95cb 100644 --- a/irc/isupport/list.go +++ b/irc/isupport/list.go @@ -43,9 +43,10 @@ func (il *List) AddNoValue(name string) { // getTokenString gets the appropriate string for a token+value. func getTokenString(name string, value *string) string { - if value == nil { + if value == nil || len(*value) == 0 { return name } + return fmt.Sprintf("%s=%s", name, *value) }