diff --git a/irc/metadata.go b/irc/metadata.go index adba3d76..a506b8ba 100644 --- a/irc/metadata.go +++ b/irc/metadata.go @@ -5,7 +5,6 @@ import ( "iter" "maps" "regexp" - "strings" "github.com/ergochat/ergo/irc/caps" "github.com/ergochat/ergo/irc/modes" @@ -109,8 +108,6 @@ func syncChannelMetadata(server *Server, rb *ResponseBuffer, channel *Channel) { var metadataEvilCharsRegexp = regexp.MustCompile("[^A-Za-z0-9_./:-]+") func metadataKeyIsEvil(key string) bool { - key = strings.TrimSpace(key) // just in case - return len(key) == 0 || // key needs to contain stuff key[0] == ':' || // key can't start with a colon metadataEvilCharsRegexp.MatchString(key) // key can't contain the stuff it can't contain