summaryrefslogtreecommitdiff
path: root/src/server/sv_ccmds.c
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-04-06 20:39:29 +0200
committer/dev/humancontroller <devhc@example.com>2017-04-06 20:59:01 +0200
commite984293788358a72dcb57ad5d74402a3f10f0d97 (patch)
tree125ca886f39bf13f5f8f47f593788d20af684ead /src/server/sv_ccmds.c
parente8d1308d559e623843737e0fc6793435437a0629 (diff)
implement Schachtmeister v2 basics
Diffstat (limited to 'src/server/sv_ccmds.c')
-rw-r--r--src/server/sv_ccmds.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/server/sv_ccmds.c b/src/server/sv_ccmds.c
index 56c73aa8..65585308 100644
--- a/src/server/sv_ccmds.c
+++ b/src/server/sv_ccmds.c
@@ -284,6 +284,33 @@ static void SV_KillServer_f( void ) {
SV_Shutdown( "killserver" );
}
+static void SV_SMQ_f( void ) {
+ static qboolean schmResolved = qfalse;
+ static netadr_t schmAddress;
+ char args[ MAX_STRING_CHARS ];
+ char *p;
+ int s, i;
+
+ if ( !schmResolved ) {
+ schmResolved = qtrue;
+ NET_StringToAdr( "127.0.0.1:1337", &schmAddress, NA_IP );
+ }
+
+ p = args;
+ s = sizeof( args );
+
+ for ( i = 1; i < Cmd_Argc(); ++i )
+ {
+ int l;
+ Com_sprintf( p, s, " \"%s\"", Cmd_Argv( i ) );
+ l = strlen( p );
+ s -= l;
+ p += l;
+ }
+
+ NET_OutOfBandPrint( NS_SERVER, schmAddress, "sm2query%s", args );
+}
+
//===========================================================
/*
@@ -320,6 +347,7 @@ void SV_AddOperatorCommands( void ) {
Cmd_AddCommand ("devmap", SV_Map_f);
Cmd_SetCommandCompletionFunc( "devmap", SV_CompleteMapName );
Cmd_AddCommand ("killserver", SV_KillServer_f);
+ Cmd_AddCommand ("smq", SV_SMQ_f);
}
/*