diff options
author | Paweł Redman <trem.redman@gmail.com> | 2013-09-12 20:02:51 +0200 |
---|---|---|
committer | Paweł Redman <trem.redman@gmail.com> | 2013-09-12 20:02:51 +0200 |
commit | e36075a420f446225ae8632fb2df3cf2ad6bec47 (patch) | |
tree | f2b5d8aa089c52a6e74576dd2eca0484d4681602 /src | |
parent | 85d99859798982dd88c7de8d8b7a71d4ac4b4a2b (diff) |
Fix a bunch of bugs related to administration and announcing
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_admin.c | 10 | ||||
-rw-r--r-- | src/game/g_main.c | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index cdc87c3..817b1fc 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -2279,11 +2279,11 @@ qboolean G_admin_listplayers( gentity_t *ent ) } } - if( Q_stricmp( p->pers.admin->title, "" ) ) + if( p->pers.admin && Q_stricmp( p->pers.admin->title, "" ) ) Q_strncpyz( lname, p->pers.admin->title, sizeof( lname ) ); else if( l ) Q_strncpyz( lname, l->name, sizeof( lname ) ); - + for( colorlen = j = 0; lname[ j ]; j++ ) { if( Q_IsColorString( &lname[ j ] ) ) @@ -3473,7 +3473,7 @@ qboolean G_admin_register( gentity_t *ent ) if( !ent ) return qfalse; - if( !ent->client->pers.admin ) + if( !ent->client->pers.admin || !ent->client->pers.admin->level ) { g_admin_admin_t *a; @@ -3488,10 +3488,10 @@ qboolean G_admin_register( gentity_t *ent ) Q_strncpyz( a->guid, ent->client->pers.guid, sizeof( a->guid ) ); a->level = g_adminRegisterLevel.integer; - AP( va( "print \"^3register: ^7'%s'^7 is now a registered nickname\n\"", ent->client->pers.netname ) ); + AP( va( "print \"^3register: ^7'%s^7' is now a registered nickname\n\"", ent->client->pers.netname ) ); } else - ADMP( "^3register: ^7you have updated your nick protection" ); + ADMP( "^3register: ^7you have updated your nick protection\n" ); Q_strncpyz( ent->client->pers.admin->name, ent->client->pers.netname, diff --git a/src/game/g_main.c b/src/game/g_main.c index 1750e26..8f43d81 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -2273,8 +2273,7 @@ void G_CheckVote( team_t team ) if( pass ) { - if( !level.voteAborted[ team ] ) - trap_SendServerCommand( -1, "announce votepassed" ); + trap_SendServerCommand( -1, "announce votepassed" ); level.voteExecuteTime[ team ] = level.time + level.voteDelay[ team ]; } else |