libnmdc compatibility updates

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
. 2016-11-29 19:58:12 +13:00
parent e628bdcf91
commit 85e44756e3

View File

@ -114,7 +114,7 @@ func (s *Server) RunWorker() {
}
// If this was a /timeout/, send a KA and continue.
if libnmdc.CheckIsNetTimeout(err) {
if netErr, ok := err.(net.Error); ok && netErr.Timeout() {
s.writeClient("PING :" + s.name)
continue
}
@ -241,7 +241,7 @@ func (s *Server) upstreamWorker() {
// description change - no relevance for IRC users
case libnmdc.EVENT_CONNECTION_STATE_CHANGED:
s.postGeneralMessageInRoom("* Upstream: " + hubEvent.StateChange.Format())
s.postGeneralMessageInRoom("* Upstream: " + hubEvent.StateChange.String())
if hubEvent.StateChange == libnmdc.CONNECTIONSTATE_CONNECTED {
s.sendNames() // delay doing this until now