diff options
author | M. Kristall <mkpdev@gmail.com> | 2012-09-04 20:20:00 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:26:22 +0000 |
commit | 2e643e9387e8f786e78591dcde2d64581cc2a4a6 (patch) | |
tree | f4a277be1e6324a1455207a68254a0fc62da8d5d /src/game/g_admin.c | |
parent | fe6defc056f9fc2546c870dc42e2fe5a15cb5e84 (diff) |
* Revision 2273 modified the previous ban instead of the specified one
Diffstat (limited to 'src/game/g_admin.c')
-rw-r--r-- | src/game/g_admin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 44617547..c3431a89 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -1766,7 +1766,7 @@ qboolean G_admin_unban( gentity_t *ent ) int time = trap_RealTime( NULL ); char bs[ 5 ]; int i; - g_admin_ban_t *ban, *p; + g_admin_ban_t *ban; if( trap_Argc() < 2 ) { @@ -1775,8 +1775,8 @@ qboolean G_admin_unban( gentity_t *ent ) } trap_Argv( 1, bs, sizeof( bs ) ); bnum = atoi( bs ); - for( ban = p = g_admin_bans, i = 1; ban && i < bnum; - p = ban, ban = ban->next, i++ ); + for( ban = g_admin_bans, i = 1; ban && i < bnum; ban = ban->next, i++ ) + ; if( i != bnum || !ban ) { ADMP( "^3unban: ^7invalid ban#\n" ); @@ -1801,7 +1801,7 @@ qboolean G_admin_unban( gentity_t *ent ) bnum, ban->name, ( ent ) ? ent->client->pers.netname : "console" ) ); - p->expires = time; + ban->expires = time; admin_writeconfig(); return qtrue; } |