summaryrefslogtreecommitdiff
path: root/src/server/sv_main.c
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-04-07 22:36:41 +0200
committer/dev/humancontroller <devhc@example.com>2017-04-17 01:06:07 +0200
commita150f425666146fbdca921ea44838b81889ec9e9 (patch)
tree8047f4e6a2aaf3e0d8144ddfc123b999fa1e27f0 /src/server/sv_main.c
parent2b6f1a4d14154312d08e13ba6e8ef23ccf782922 (diff)
moar shit
TODO (for me): rebase this shit
Diffstat (limited to 'src/server/sv_main.c')
-rw-r--r--src/server/sv_main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/server/sv_main.c b/src/server/sv_main.c
index a39e3769..8d75d55f 100644
--- a/src/server/sv_main.c
+++ b/src/server/sv_main.c
@@ -755,11 +755,19 @@ static void SVC_RemoteCommand( netadr_t from, msg_t *msg ) {
}
static void SVC_SchachtmeisterResponse( netadr_t from ) {
+ int tmp[ 4 ];
+
if ( !( from.type == NA_IP && from.ip[0] == 127 ) ) {
return;
}
- strcpy( Cmd_Argv( 0 ), "smr" );
+ if ( Cmd_Argc() >= 2 && sscanf( Cmd_Argv( 1 ), "%i.%i.%i.%i", &tmp[ 0 ], &tmp[ 1 ], &tmp[ 2 ], &tmp[ 3 ] ) == 4 ) { // compatibility with out-of-date crapware conceived in the future
+ char cmdl[ MAX_STRING_CHARS ];
+ Com_sprintf( cmdl, sizeof( cmdl ), "smr ipa %s", Cmd_ArgsFrom( 1 ) );
+ Cmd_TokenizeString( cmdl );
+ } else {
+ strcpy( Cmd_Argv( 0 ), "smr" );
+ }
SV_GameCommand();
}