From 85e44756e325635598c07d4d5511a5fcf02441bd Mon Sep 17 00:00:00 2001 From: "." <.@.> Date: Tue, 29 Nov 2016 19:58:12 +1300 Subject: [PATCH] libnmdc compatibility updates --HG-- branch : nmdc-ircfrontend --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 7a8a4b6..4f0bcf8 100644 --- a/server.go +++ b/server.go @@ -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