3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 03:49:27 +01:00

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

This commit is contained in:
jesopo 2020-05-26 23:51:28 +01:00
parent 29165ded62
commit 8eee127e4d

View File

@ -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)
}