Browse Source

don't add trailing = to ISUPPORT tokens when value is empty string

tags/v2.2.0-rc1
jesopo 4 years ago
parent
commit
8eee127e4d
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      irc/isupport/list.go

+ 2
- 1
irc/isupport/list.go View File

@@ -43,9 +43,10 @@ func (il *List) AddNoValue(name string) {
43 43
 
44 44
 // getTokenString gets the appropriate string for a token+value.
45 45
 func getTokenString(name string, value *string) string {
46
-	if value == nil {
46
+	if value == nil || len(*value) == 0 {
47 47
 		return name
48 48
 	}
49
+
49 50
 	return fmt.Sprintf("%s=%s", name, *value)
50 51
 }
51 52
 

Loading…
Cancel
Save