send error on chat while disconnected

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
. 2016-05-05 20:02:29 +12:00
parent 5716664de9
commit cc04626518

View File

@ -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