# HG changeset patch # User unc0rr # Date 1225658890 0 # Node ID d3323637da1f20f98891230e356d311743ad54f6 # Parent 87e5a6c3882cd637005722646d0b68ecde7dd04b Client sends PONG to server's PING diff -r 87e5a6c3882c -r d3323637da1f QTfrontend/newnetclient.cpp --- a/QTfrontend/newnetclient.cpp Sun Nov 02 20:41:02 2008 +0000 +++ b/QTfrontend/newnetclient.cpp Sun Nov 02 20:48:10 2008 +0000 @@ -225,6 +225,11 @@ return; } + if (lst[0] == "PING") { + RawSendNet(QString("PONG")); + return; + } + if (lst[0] == "ROOMS") { QStringList tmp = lst; tmp.removeFirst(); diff -r 87e5a6c3882c -r d3323637da1f netserver/HWProto.hs --- a/netserver/HWProto.hs Sun Nov 02 20:41:02 2008 +0000 +++ b/netserver/HWProto.hs Sun Nov 02 20:48:10 2008 +0000 @@ -82,6 +82,9 @@ handleCmd _ _ _ ["PING"] = -- core requsted (noChangeClients, noChangeRooms, answerPing) +handleCmd _ _ _ ["PONG"] = + (noChangeClients, noChangeRooms, []) + -- check state and call state-dependent commmand handlers handleCmd client clients rooms cmd = if null (nick client) || protocol client == 0 then