summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
authorTony J. White <tjw@tjw.org>2006-12-12 18:22:44 +0000
committerTony J. White <tjw@tjw.org>2006-12-12 18:22:44 +0000
commit015227d831b60b140510e48f443cfa13edbebd25 (patch)
tree084c4423b6a80a2ce0dcf3aab79e7a52ec9d215f /src/game/g_cmds.c
parent12b4739e3cc6005e882f2daf3b0489e3b4aff04b (diff)
* (bug 2954) when g_admin is enabled use !ban [ip] instead of !kick [slot]
on vote kicks. this is to deal with people disconnecting before the vote ends to avoid the temp ban and prevents an innocent from grabbing the slot only to be kicked when the vote ends. * fix duration parsing for the g_admin !ban command when time is in seconds
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 5a6a251d..3471955a 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1093,9 +1093,10 @@ void Cmd_CallVote_f( gentity_t *ent )
Q_CleanStr( kickee );
if( g_admin.string[ 0 ] )
{
- // !kick will add a temp ban and a descriptive drop message
+ // use ip in case this player disconnects before the vote ends
Com_sprintf( level.voteString, sizeof( level.voteString ),
- "!kick %d vote kick", clientNum );
+ "!ban %s %d vote kick", level.clients[ clientNum ].pers.ip,
+ g_adminTempBan.integer + 1 );
}
else
{
@@ -1341,10 +1342,11 @@ void Cmd_CallTeamVote_f( gentity_t *ent )
if( g_admin.string[ 0 ] )
{
- // !kick will add a temp ban and a descriptive drop message
+ // use ip in case this player disconnects before the vote ends
Com_sprintf( level.teamVoteString[ cs_offset ],
- sizeof( level.teamVoteString[ cs_offset ] ),
- "!kick %d team vote kick", clientNum );
+ sizeof( level.teamVoteString[ cs_offset ] ),
+ "!ban %s %d team vote kick", level.clients[ clientNum ].pers.ip,
+ g_adminTempBan.integer + 1 );
}
else
{