summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorChristopher Schwarz <lakitu7@gmail.com>2011-02-16 16:28:48 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:18:00 +0000
commited974bdc2d004ade1c1e8643247b72d8b0a0aea5 (patch)
tree0856695893130b372721231c0f6848664606dc5e /src/game
parent5e68c282cde20d413978ee949280f6d092fbc8ee (diff)
* (bug 4904) Notify admins of callteamvotes on the opposing team
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_cmds.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index c0476dae..82d13a13 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1460,9 +1460,29 @@ void Cmd_CallVote_f( gentity_t *ent )
}
else
{
- G_TeamCommand( team, va( "print \"%s" S_COLOR_WHITE
- " called a team vote: %s\n\"", ent->client->pers.netname,
- level.voteDisplayString[ team ] ) );
+ int i;
+
+ for( i = 0 ; i < level.maxclients ; i++ )
+ {
+ if( level.clients[ i ].pers.connected == CON_CONNECTED )
+ {
+ if( level.clients[ i ].pers.teamSelection == team ||
+ ( level.clients[ i ].pers.teamSelection == TEAM_NONE &&
+ G_admin_permission( &g_entities[ i ], ADMF_SPEC_ALLCHAT ) ) )
+ {
+ trap_SendServerCommand( i, va( "print \"%s" S_COLOR_WHITE
+ " called a team vote: %s\n\"", ent->client->pers.netname,
+ level.voteDisplayString[ team ] ) );
+ }
+ else if( G_admin_permission( &g_entities[ i ], ADMF_ADMINCHAT ) )
+ {
+ trap_SendServerCommand( i, va( "chat -1 %d \"" S_COLOR_YELLOW "%s"
+ S_COLOR_YELLOW " called a team vote (%ss): %s\"", SAY_ADMINS,
+ ent->client->pers.netname, BG_TeamName( team ),
+ level.voteDisplayString[ team ] ) );
+ }
+ }
+ }
}
G_DecolorString( ent->client->pers.netname, caller, sizeof( caller ) );