|
@@ -148,11 +148,7 @@ func ParseDefaultUserModes(rawModes *string) modes.Modes {
|
148
|
148
|
|
149
|
149
|
// #1021: channel key must be valid as a non-final parameter
|
150
|
150
|
func validateChannelKey(key string) bool {
|
151
|
|
- // empty string is valid in this context because it unsets the mode
|
152
|
|
- if len(key) == 0 {
|
153
|
|
- return true
|
154
|
|
- }
|
155
|
|
- return key[0] != ':' && strings.IndexByte(key, ' ') == -1
|
|
151
|
+ return key != "" && key[0] != ':' && strings.IndexByte(key, ' ') == -1
|
156
|
152
|
}
|
157
|
153
|
|
158
|
154
|
// ApplyChannelModeChanges applies a given set of mode changes.
|