diff --git a/server.go b/server.go index 5c9581b..4147cef 100644 --- a/server.go +++ b/server.go @@ -140,7 +140,7 @@ func (s *Server) handleCommand(client *Client, command string, args []string) { channels := strings.Split(args[0], ",") for _, channel := range channels { //Join the channel if it's valid - if channelRegexp.Match([]byte(channel)) { + if channelRegexp.MatchString(channel) { client.joinChannel(channel) } } @@ -161,7 +161,7 @@ func (s *Server) handleCommand(client *Client, command string, args []string) { channels := strings.Split(args[0], ",") for _, channel := range channels { //Part the channel if it's valid - if channelRegexp.Match([]byte(channel)) { + if channelRegexp.MatchString(channel) { client.partChannel(channel, reason) } }