diff options
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r-- | src/game/g_client.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c index 5c01d0b..99d26c7 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1557,6 +1557,27 @@ char *ClientConnect( int clientNum, qboolean firstTime ) client->sess.restartTeam = PTE_NONE; } + if( !( G_admin_permission( ent, ADMF_NOAUTOBAHN ) || + G_admin_permission( ent, ADMF_IMMUNITY ) ) ) + { + extern g_admin_namelog_t *g_admin_namelog[ 128 ]; + for( i = 0; i < MAX_ADMIN_NAMELOGS && g_admin_namelog[ i ]; i++ ) + { + if( !Q_stricmp( ip, g_admin_namelog[ i ]->ip ) || !Q_stricmp( guid, g_admin_namelog[ i ]->guid ) ) + { + schachtmeisterJudgement_t *j = &g_admin_namelog[i]->smj; + if( j->ratingTime ) + { + if( j->rating >= g_schachtmeisterClearThreshold.integer ) + break; + else if( j->rating <= g_schachtmeisterAutobahnThreshold.integer ) + return "fuck off"; + G_AdminsPrintf( "%s^7 (#%d) has rating %d\n", ent->client->pers.netname, ent - g_entities, j->rating ); + } + break; + } + } + } return NULL; } |