summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c18
1 files changed, 17 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" ) )
{