summaryrefslogtreecommitdiff
path: root/src/server/sv_ccmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/sv_ccmds.c')
-rw-r--r--src/server/sv_ccmds.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/server/sv_ccmds.c b/src/server/sv_ccmds.c
index 61ee6f11..21a5f0e5 100644
--- a/src/server/sv_ccmds.c
+++ b/src/server/sv_ccmds.c
@@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
+#include <arpa/inet.h>
#include "server.h"
/*
@@ -297,16 +298,13 @@ static void SV_SMQ_f( void ) {
if ( sv_schachtmeisterPort->modified &&
sv_schachtmeisterPort->integer >= 1 && sv_schachtmeisterPort->integer <= 65535 )
{
- schmAddress.port = sv_schachtmeisterPort->integer;
+ schmAddress.port = htons(sv_schachtmeisterPort->integer);
}
- if ( Cmd_Argc() >= 3 && !Q_stricmp( Cmd_Argv( 1 ), "ipa" ) ) // compatibility with out-of-date crapware conceived in the future
- {
+ if ( Cmd_Argc() >= 3 && !Q_stricmp( Cmd_Argv( 1 ), "ipa" ) ) { // compatibility with out-of-date crapware conceived in the future
NET_OutOfBandPrint( NS_SERVER, schmAddress, "sm2query %s", Cmd_ArgsFrom( 2 ) );
Com_Printf( "^3query [^7sm2query %s^3]\n", Cmd_ArgsFrom( 2 ) ); // DELME
- }
- else
- {
+ } else {
char args[ MAX_STRING_CHARS ];
char *p;
int s, i;