summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_cmds.c18
-rw-r--r--src/game/g_main.c1
2 files changed, 18 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 7674c62..764623b 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1744,6 +1744,8 @@ void Cmd_CallVote_f( gentity_t *ent )
if( !Q_stricmp( arg1, "kick" ) )
{
+ char n1[ MAX_NAME_LENGTH ];
+
if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) )
{
trap_SendServerCommand( ent-g_entities,
@@ -1758,9 +1760,13 @@ void Cmd_CallVote_f( gentity_t *ent )
"!ban %s \"%s\" vote kick", level.clients[ clientNum ].pers.ip,
g_adminTempBan.string );
if ( reason[0]!='\0' )
- Q_strcat( level.voteString, sizeof( level.voteDisplayString ), va( "(%s^7)", reason ) );
+ Q_strcat( level.voteString, sizeof( level.voteString ), va( ": \"%s^7\"", reason ) );
+ G_SanitiseString( ent->client->pers.netname, n1, sizeof( n1 ) );
+ Q_strcat( level.voteString, sizeof( level.voteString ), va( ", \"%s\"", n1 ) );
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ),
"Kick player \'%s\'", name );
+
+ level.votePassThreshold = g_kickVotesPercent.integer;
}
else if( !Q_stricmp( arg1, "spec" ) )
{
@@ -2386,6 +2392,8 @@ void Cmd_CallTeamVote_f( gentity_t *ent )
if( !Q_stricmp( arg1, "kick" ) )
{
+ char n1[ MAX_NAME_LENGTH ];
+
if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) )
{
trap_SendServerCommand( ent-g_entities,
@@ -2401,9 +2409,17 @@ void Cmd_CallTeamVote_f( gentity_t *ent )
sizeof( level.teamVoteString[ cs_offset ] ),
"!ban %s \"%s\" team vote kick", level.clients[ clientNum ].pers.ip,
g_adminTempBan.string );
+ if( reason[0] )
+ Q_strcat( level.teamVoteString[ cs_offset ], sizeof( level.teamVoteString[ cs_offset ] ),
+ va( ": \"%s\"", reason ) );
+ G_SanitiseString( ent->client->pers.netname, n1, sizeof( n1 ) );
+ Q_strcat( level.teamVoteString[ cs_offset ], sizeof( level.teamVoteString[ cs_offset ] ),
+ va( ", \"%s\"", n1 ) );
Com_sprintf( level.teamVoteDisplayString[ cs_offset ],
sizeof( level.teamVoteDisplayString[ cs_offset ] ),
"Kick player '%s'", name );
+
+ level.votePassThreshold = g_kickVotesPercent.integer;
}
else if( !Q_stricmp( arg1, "denybuild" ) )
{
diff --git a/src/game/g_main.c b/src/game/g_main.c
index b3fe4a2..bffbdf7 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -331,6 +331,7 @@ static cvarTable_t gameCvarTable[ ] =
{ &g_votableMaps, "g_votableMaps", "", CVAR_ARCHIVE, 0, qtrue },
{ &g_suddenDeathVotePercent, "g_suddenDeathVotePercent", "74", CVAR_ARCHIVE, 0, qfalse },
{ &g_suddenDeathVoteDelay, "g_suddenDeathVoteDelay", "180", CVAR_ARCHIVE, 0, qfalse },
+ { &g_kickVotesPercent, "g_kickVotesPercent", "50", CVAR_ARCHIVE, 0, qfalse },
{ &g_customVote1, "g_customVote1", "", CVAR_ARCHIVE, 0, qfalse },
{ &g_customVote2, "g_customVote2", "", CVAR_ARCHIVE, 0, qfalse },
{ &g_customVote3, "g_customVote3", "", CVAR_ARCHIVE, 0, qfalse },