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.c118
1 files changed, 0 insertions, 118 deletions
diff --git a/src/server/sv_ccmds.c b/src/server/sv_ccmds.c
index 33926d57..60de4275 100644
--- a/src/server/sv_ccmds.c
+++ b/src/server/sv_ccmds.c
@@ -386,122 +386,6 @@ static void SV_Kick_f( void ) {
/*
==================
-SV_Ban_f
-
-Ban a user from being able to play on this server through the auth
-server
-==================
-*/
-static void SV_Ban_f( void ) {
- client_t *cl;
-
- // make sure server is running
- if ( !com_sv_running->integer ) {
- Com_Printf( "Server is not running.\n" );
- return;
- }
-
- if ( Cmd_Argc() != 2 ) {
- Com_Printf ("Usage: banUser <player name>\n");
- return;
- }
-
- cl = SV_GetPlayerByHandle();
-
- if (!cl) {
- return;
- }
-
- if( cl->netchan.remoteAddress.type == NA_LOOPBACK ) {
- SV_SendServerCommand(NULL, "print \"%s\"", "Cannot kick host player\n");
- return;
- }
-
- //FIXME: there is no auth server in Tremulous
-#if 0
- // look up the authorize server's IP
- if ( !svs.authorizeAddress.ip[0] && svs.authorizeAddress.type != NA_BAD ) {
- Com_Printf( "Resolving %s\n", AUTHORIZE_SERVER_NAME );
- if ( !NET_StringToAdr( AUTHORIZE_SERVER_NAME, &svs.authorizeAddress ) ) {
- Com_Printf( "Couldn't resolve address\n" );
- return;
- }
- svs.authorizeAddress.port = BigShort( PORT_AUTHORIZE );
- Com_Printf( "%s resolved to %i.%i.%i.%i:%i\n", AUTHORIZE_SERVER_NAME,
- svs.authorizeAddress.ip[0], svs.authorizeAddress.ip[1],
- svs.authorizeAddress.ip[2], svs.authorizeAddress.ip[3],
- BigShort( svs.authorizeAddress.port ) );
- }
-
- // otherwise send their ip to the authorize server
- if ( svs.authorizeAddress.type != NA_BAD ) {
- NET_OutOfBandPrint( NS_SERVER, svs.authorizeAddress,
- "banUser %i.%i.%i.%i", cl->netchan.remoteAddress.ip[0], cl->netchan.remoteAddress.ip[1],
- cl->netchan.remoteAddress.ip[2], cl->netchan.remoteAddress.ip[3] );
- Com_Printf("%s was banned from coming back\n", cl->name);
- }
-#endif
-}
-
-/*
-==================
-SV_BanNum_f
-
-Ban a user from being able to play on this server through the auth
-server
-==================
-*/
-static void SV_BanNum_f( void ) {
- client_t *cl;
-
- // make sure server is running
- if ( !com_sv_running->integer ) {
- Com_Printf( "Server is not running.\n" );
- return;
- }
-
- if ( Cmd_Argc() != 2 ) {
- Com_Printf ("Usage: banClient <client number>\n");
- return;
- }
-
- cl = SV_GetPlayerByNum();
- if ( !cl ) {
- return;
- }
- if( cl->netchan.remoteAddress.type == NA_LOOPBACK ) {
- SV_SendServerCommand(NULL, "print \"%s\"", "Cannot kick host player\n");
- return;
- }
-
- //FIXME: there is no auth server in Tremulous
-#if 0
- // look up the authorize server's IP
- if ( !svs.authorizeAddress.ip[0] && svs.authorizeAddress.type != NA_BAD ) {
- Com_Printf( "Resolving %s\n", AUTHORIZE_SERVER_NAME );
- if ( !NET_StringToAdr( AUTHORIZE_SERVER_NAME, &svs.authorizeAddress ) ) {
- Com_Printf( "Couldn't resolve address\n" );
- return;
- }
- svs.authorizeAddress.port = BigShort( PORT_AUTHORIZE );
- Com_Printf( "%s resolved to %i.%i.%i.%i:%i\n", AUTHORIZE_SERVER_NAME,
- svs.authorizeAddress.ip[0], svs.authorizeAddress.ip[1],
- svs.authorizeAddress.ip[2], svs.authorizeAddress.ip[3],
- BigShort( svs.authorizeAddress.port ) );
- }
-
- // otherwise send their ip to the authorize server
- if ( svs.authorizeAddress.type != NA_BAD ) {
- NET_OutOfBandPrint( NS_SERVER, svs.authorizeAddress,
- "banUser %i.%i.%i.%i", cl->netchan.remoteAddress.ip[0], cl->netchan.remoteAddress.ip[1],
- cl->netchan.remoteAddress.ip[2], cl->netchan.remoteAddress.ip[3] );
- Com_Printf("%s was banned from coming back\n", cl->name);
- }
-#endif
-}
-
-/*
-==================
SV_KickNum_f
Kick a user off of the server FIXME: move to game
@@ -729,8 +613,6 @@ void SV_AddOperatorCommands( void ) {
Cmd_AddCommand ("heartbeat", SV_Heartbeat_f);
Cmd_AddCommand ("kick", SV_Kick_f);
Cmd_AddCommand ("kickAll", SV_KickAll_f);
- Cmd_AddCommand ("banUser", SV_Ban_f);
- Cmd_AddCommand ("banClient", SV_BanNum_f);
Cmd_AddCommand ("clientkick", SV_KickNum_f);
Cmd_AddCommand ("status", SV_Status_f);
Cmd_AddCommand ("serverinfo", SV_Serverinfo_f);