Permalink
Browse files

Add ping command

  • Loading branch information...
mbasaglia committed Oct 29, 2015
1 parent 186a8ae commit 93d3084f19348a9a6f85c04d68dad96ff07b8a70
Showing with 13 additions and 0 deletions.
  1. +13 −0 daemon/src/engine/server/sv_main.cpp
@@ -673,6 +673,15 @@ void SVC_Info( netadr_t from, const Cmd::Args& args )
NET_OutOfBandPrint( NS_SERVER, from, "infoResponse\n%s", infostring );
}
/*
* Sends back a simple reply
* Used to check if the server is online without sending any other info
*/
void SVC_Ping( netadr_t from, const Cmd::Args& )
{
NET_OutOfBandPrint( NS_SERVER, from, "ack\n" );
}
/*
=================
SV_CheckDRDoS
@@ -936,6 +945,10 @@ void SV_ConnectionlessPacket( netadr_t from, msg_t *msg )
// server disconnect messages when their new server sees our final
// sequenced messages to the old client
}
else if ( args.Argv(0) == "ping" )
{
SVC_Ping( from, args );
}
else
{
Com_DPrintf( "bad connectionless packet from %s:\n%s\n", NET_AdrToString( from ), args.ConcatArgs(0).c_str() );

0 comments on commit 93d3084

Please sign in to comment.