diff --git a/server.go b/server.go index bb3b1ec..ed8d039 100644 --- a/server.go +++ b/server.go @@ -133,12 +133,12 @@ func (s *Server) RunWorker() { // Client sent a command fields := strings.Fields(string(line)) - if len(fields) < 2 { + if len(fields) == 0 { return } if strings.HasPrefix(fields[0], ":") { - fields = fields[1:] + fields[0] = fields[0][1:] } s.handleCommand(strings.ToUpper(fields[0]), fields[1:])