summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-05-27 22:39:06 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-05-27 22:39:06 +0200
commit05e4e1479b4a57d781572afa4346a6ef960043de (patch)
tree2d469423d938acdfe9f101c9af5ac32903c68728
parente532a5d3fa21784423bcaf6209b235f364684668 (diff)
Remove /ignore.
-rw-r--r--src/cgame/cg_local.h1
-rw-r--r--src/cgame/cg_players.c7
-rw-r--r--src/cgame/cg_servercmds.c37
-rw-r--r--src/game/g_client.c10
-rw-r--r--src/game/g_cmds.c74
-rw-r--r--src/game/g_local.h1
-rw-r--r--src/game/g_session.c12
7 files changed, 17 insertions, 125 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index b3d6e85..dc289b9 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -1456,7 +1456,6 @@ typedef struct
cgMedia_t media;
voice_t *voices;
- clientList_t ignoreList;
int alienBuildPool;
int alienBuildPoolMax;
diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c
index 32f3fb8..29f6992 100644
--- a/src/cgame/cg_players.c
+++ b/src/cgame/cg_players.c
@@ -757,13 +757,6 @@ void CG_NewClientInfo( int clientNum )
// the old value
memset( &newInfo, 0, sizeof( newInfo ) );
-
- // grab our own ignoreList
- if( clientNum == cg.predictedPlayerState.clientNum )
- {
- v = Info_ValueForKey( configstring, "ig" );
- Com_ClientListParse( &cgs.ignoreList, v );
- }
// isolate the player's name
v = Info_ValueForKey( configstring, "n" );
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index a373e5a..7326ba8 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -948,7 +948,6 @@ static void CG_Say( int clientNum, saymode_t mode, const char *text )
{
char *name;
char prefix[ 11 ] = "";
- char *ignore = "";
char *location = "";
char *color;
char *maybeColon;
@@ -969,9 +968,6 @@ static void CG_Say( int clientNum, saymode_t mode, const char *text )
Com_sprintf( prefix, sizeof( prefix ), "[%s%c" S_COLOR_WHITE "] ",
tcolor, toupper( *( BG_TeamName( ci->team ) ) ) );
- if( Com_ClientListContains( &cgs.ignoreList, clientNum ) )
- ignore = "[skipnotify]";
-
if( ( mode == SAY_TEAM || mode == SAY_AREA ) &&
cg.snap->ps.pm_type != PM_INTERMISSION )
{
@@ -1016,37 +1012,32 @@ static void CG_Say( int clientNum, saymode_t mode, const char *text )
switch( mode )
{
case SAY_ALL:
- // might already be ignored but in that case no harm is done
- if( cg_teamChatsOnly.integer )
- ignore = "[skipnotify]";
-
- CG_Printf( "%s%s%s" S_COLOR_WHITE "%s %c" S_COLOR_GREEN "%s\n",
- ignore, prefix, name, maybeColon, INDENT_MARKER, text );
+ CG_Printf( "%s%s" S_COLOR_WHITE "%s %c" S_COLOR_GREEN "%s\n",
+ prefix, name, maybeColon, INDENT_MARKER, text );
break;
case SAY_TEAM:
- CG_Printf( "%s%s(%s" S_COLOR_WHITE ")%s%s %c" S_COLOR_CYAN "%s\n",
- ignore, prefix, name, location, maybeColon, INDENT_MARKER, text );
+ CG_Printf( "%s(%s" S_COLOR_WHITE ")%s%s %c" S_COLOR_CYAN "%s\n",
+ prefix, name, location, maybeColon, INDENT_MARKER, text );
break;
case SAY_ADMINS:
case SAY_ADMINS_PUBLIC:
- CG_Printf( "%s%s%s%s" S_COLOR_WHITE "%s %c" S_COLOR_MAGENTA "%s\n",
- ignore, prefix,
+ CG_Printf( "%s%s%s" S_COLOR_WHITE "%s %c" S_COLOR_MAGENTA "%s\n",
+ prefix,
( mode == SAY_ADMINS ) ? "[ADMIN]" : "[PLAYER]",
name, maybeColon, INDENT_MARKER, text );
break;
case SAY_AREA:
- CG_Printf( "%s%s<%s" S_COLOR_WHITE ">%s%s %c" S_COLOR_BLUE "%s\n",
- ignore, prefix, name, location, maybeColon, INDENT_MARKER, text );
+ CG_Printf( "%s<%s" S_COLOR_WHITE ">%s%s %c" S_COLOR_BLUE "%s\n",
+ prefix, name, location, maybeColon, INDENT_MARKER, text );
break;
case SAY_PRIVMSG:
case SAY_TPRIVMSG:
color = ( mode == SAY_TPRIVMSG ) ? S_COLOR_CYAN : S_COLOR_GREEN;
- CG_Printf( "%s%s[%s" S_COLOR_WHITE " -> %s" S_COLOR_WHITE "]%s %c%s%s\n",
- ignore, prefix, name, cgs.clientinfo[ cg.clientNum ].name,
+ CG_Printf( "%s[%s" S_COLOR_WHITE " -> %s" S_COLOR_WHITE "]%s %c%s%s\n",
+ prefix, name, cgs.clientinfo[ cg.clientNum ].name,
maybeColon, INDENT_MARKER, color, text );
- if( !ignore[0] )
- CG_CenterPrint( va( "%sPrivate message from: " S_COLOR_WHITE "%s",
- color, name ), 200, GIANTCHAR_WIDTH * 4 );
+ CG_CenterPrint( va( "%sPrivate message from: " S_COLOR_WHITE "%s",
+ color, name ), 200, GIANTCHAR_WIDTH * 4 );
break;
case SAY_RAW:
CG_Printf( "%s\n", text );
@@ -1191,10 +1182,6 @@ static void CG_ParseVoice( void )
if( !track )
return;
- // don't play audio track for lamers
- if( Com_ClientListContains( &cgs.ignoreList, clientNum ) )
- return;
-
switch( vChan )
{
case VOICE_CHAN_ALL:
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 );
}