diff --git a/server.go b/server.go index 98b3bb3..9019b6b 100644 --- a/server.go +++ b/server.go @@ -260,6 +260,11 @@ func (s *Server) handleRegisteredCommand(command string, args []string) { return } + if s.upstream.State != libnmdc.CONNECTIONSTATE_CONNECTED { + s.reply(errCannotSend, args[0]) + return + } + message := strings.Join(args[1:], " ")[1:] // strip leading colon // IRC is case-insensitive case-preserving. We can respect that for the