diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-05-27 22:39:06 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-05-27 22:39:06 +0200 |
commit | 05e4e1479b4a57d781572afa4346a6ef960043de (patch) | |
tree | 2d469423d938acdfe9f101c9af5ac32903c68728 /src/game | |
parent | e532a5d3fa21784423bcaf6209b235f364684668 (diff) |
Remove /ignore.
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_client.c | 10 | ||||
-rw-r--r-- | src/game/g_cmds.c | 74 | ||||
-rw-r--r-- | src/game/g_local.h | 1 | ||||
-rw-r--r-- | src/game/g_session.c | 12 |
4 files changed, 5 insertions, 92 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c index 896a7fc..9c999de 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1064,9 +1064,8 @@ char *ClientUserinfoChanged( int clientNum, qboolean forceName ) // print scoreboards, display models, and play custom sounds Com_sprintf( userinfo, sizeof( userinfo ), - "n\\%s\\t\\%i\\model\\%s\\ig\\%16s\\v\\%s", + "n\\%s\\t\\%i\\model\\%s\\v\\%s", client->pers.netname, client->pers.teamSelection, model, - Com_ClientListString( &client->sess.ignoreList ), client->pers.voice ); trap_SetConfigstring( CS_PLAYERS + clientNum, userinfo ); @@ -1660,13 +1659,6 @@ void ClientDisconnect( int clientNum ) G_namelog_disconnect( ent->client ); G_Vote( ent, TEAM_NONE, qfalse ); - // stop any following clients - for( i = 0; i < level.maxclients; i++ ) - { - // remove any /ignore settings for this clientNum - Com_ClientListRemove( &level.clients[ i ].sess.ignoreList, clientNum ); - } - // send effect if they were completely connected if( ent->client->pers.connected == CON_CONNECTED && ent->client->sess.spectatorState == SPECTATOR_NOT ) diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 459c763..55a08ee 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -939,10 +939,6 @@ static qboolean G_SayTo( gentity_t *ent, gentity_t *other, saymode_t mode, const if( other->client->pers.connected != CON_CONNECTED ) return qfalse; - - // ignore messages from people in /ignore list - if( Com_ClientListContains( &other->client->sess.ignoreList, (int)( ent - g_entities ) ) ) - return qfalse; if( ( ent && !OnSameTeam( ent, other ) ) && ( mode == SAY_TEAM || mode == SAY_AREA || mode == SAY_TPRIVMSG ) ) @@ -2899,74 +2895,6 @@ void Cmd_FollowCycle_f( gentity_t *ent ) G_FollowNewClient( ent, dir ); } -static void Cmd_Ignore_f( gentity_t *ent ) -{ - int pids[ MAX_CLIENTS ]; - char name[ MAX_NAME_LENGTH ]; - char cmd[ 9 ]; - int matches = 0; - int i; - qboolean ignore = qfalse; - - trap_Argv( 0, cmd, sizeof( cmd ) ); - if( Q_stricmp( cmd, "ignore" ) == 0 ) - ignore = qtrue; - - if( trap_Argc() < 2 ) - { - trap_SendServerCommand( ent-g_entities, va( "print \"[skipnotify]" - "usage: %s [clientNum | partial name match]\n\"", cmd ) ); - return; - } - - Q_strncpyz( name, ConcatArgs( 1 ), sizeof( name ) ); - matches = G_ClientNumbersFromString( name, pids, MAX_CLIENTS ); - if( matches < 1 ) - { - trap_SendServerCommand( ent-g_entities, va( "print \"[skipnotify]" - "%s: no clients match the name '%s'\n\"", cmd, name ) ); - return; - } - - for( i = 0; i < matches; i++ ) - { - if( ignore ) - { - if( !Com_ClientListContains( &ent->client->sess.ignoreList, pids[ i ] ) ) - { - Com_ClientListAdd( &ent->client->sess.ignoreList, pids[ i ] ); - ClientUserinfoChanged( ent->client->ps.clientNum, qfalse ); - trap_SendServerCommand( ent-g_entities, va( "print \"[skipnotify]" - "ignore: added %s^7 to your ignore list\n\"", - level.clients[ pids[ i ] ].pers.netname ) ); - } - else - { - trap_SendServerCommand( ent-g_entities, va( "print \"[skipnotify]" - "ignore: %s^7 is already on your ignore list\n\"", - level.clients[ pids[ i ] ].pers.netname ) ); - } - } - else - { - if( Com_ClientListContains( &ent->client->sess.ignoreList, pids[ i ] ) ) - { - Com_ClientListRemove( &ent->client->sess.ignoreList, pids[ i ] ); - ClientUserinfoChanged( ent->client->ps.clientNum, qfalse ); - trap_SendServerCommand( ent-g_entities, va( "print \"[skipnotify]" - "unignore: removed %s^7 from your ignore list\n\"", - level.clients[ pids[ i ] ].pers.netname ) ); - } - else - { - trap_SendServerCommand( ent-g_entities, va( "print \"[skipnotify]" - "unignore: %s^7 is not on your ignore list\n\"", - level.clients[ pids[ i ] ].pers.netname ) ); - } - } - } -} - /* ================= Cmd_ListMaps_f @@ -3428,7 +3356,6 @@ commands_t cmds[ ] = { { "followprev", CMD_SPEC, Cmd_FollowCycle_f }, { "give", CMD_CHEAT|CMD_TEAM|CMD_LIVING, Cmd_Give_f }, { "god", CMD_CHEAT|CMD_TEAM|CMD_LIVING, Cmd_God_f }, - { "ignore", 0, Cmd_Ignore_f }, { "itemact", CMD_HUMAN|CMD_LIVING, Cmd_ActivateItem_f }, { "itemdeact", CMD_HUMAN|CMD_LIVING, Cmd_DeActivateItem_f }, { "itemtoggle", CMD_HUMAN|CMD_LIVING, Cmd_ToggleItem_f }, @@ -3448,7 +3375,6 @@ commands_t cmds[ ] = { { "team", 0, Cmd_Team_f }, { "teamvote", CMD_TEAM, Cmd_Vote_f }, { "test", CMD_CHEAT, Cmd_Test_f }, - { "unignore", 0, Cmd_Ignore_f }, { "vote", 0, Cmd_Vote_f }, { "where", 0, Cmd_Where_f } }; diff --git a/src/game/g_local.h b/src/game/g_local.h index 8a6f73a..1b602a6 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -274,7 +274,6 @@ typedef struct spectatorState_t spectatorState; int spectatorClient; // for chasecam and follow mode team_t restartTeam; //for !restart keepteams and !restart switchteams - clientList_t ignoreList; int seenWelcome; // determines if the client has seen server's welcome message } clientSession_t; diff --git a/src/game/g_session.c b/src/game/g_session.c index 600257c..770ed83 100644 --- a/src/game/g_session.c +++ b/src/game/g_session.c @@ -50,13 +50,12 @@ void G_WriteClientSessionData( gclient_t *client ) const char *s; const char *var; - s = va( "%i %i %i %i %i %s", + s = va( "%i %i %i %i %i", client->sess.spectatorTime, client->sess.spectatorState, client->sess.spectatorClient, client->sess.restartTeam, - client->sess.seenWelcome, - Com_ClientListString( &client->sess.ignoreList ) + client->sess.seenWelcome ); var = va( "session%i", (int)(client - level.clients) ); @@ -82,18 +81,16 @@ void G_ReadSessionData( gclient_t *client ) var = va( "session%i", (int)(client - level.clients) ); trap_Cvar_VariableStringBuffer( var, s, sizeof(s) ); - sscanf( s, "%i %i %i %i %i %16s", + sscanf( s, "%i %i %i %i %i", &client->sess.spectatorTime, &spectatorState, &client->sess.spectatorClient, &restartTeam, - &client->sess.seenWelcome, - ignorelist + &client->sess.seenWelcome ); client->sess.spectatorState = (spectatorState_t)spectatorState; client->sess.restartTeam = (team_t)restartTeam; - Com_ClientListParse( &client->sess.ignoreList, ignorelist ); } @@ -131,7 +128,6 @@ void G_InitSessionData( gclient_t *client, char *userinfo ) sess->spectatorState = SPECTATOR_FREE; sess->spectatorTime = level.time; sess->spectatorClient = -1; - memset( &sess->ignoreList, 0, sizeof( sess->ignoreList ) ); sess->seenWelcome = 0; G_WriteClientSessionData( client ); } |