From cc0462651821344c4652c86ebf98bff295614cbc Mon Sep 17 00:00:00 2001 From: "." <.@.> Date: Thu, 5 May 2016 20:02:29 +1200 Subject: [PATCH] send error on chat while disconnected --HG-- branch : nmdc-ircfrontend --- server.go | 5 +++++ 1 file changed, 5 insertions(+) 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