mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
don't add trailing = to ISUPPORT tokens when value is empty string
This commit is contained in:
parent
29165ded62
commit
8eee127e4d
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue