diff options
author | /dev/humancontroller <devhc@example.com> | 2017-04-17 04:50:54 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-04-18 01:14:59 +0200 |
commit | a829d0eeb92bac66cdac497a67cf286078db917d (patch) | |
tree | cc48ed21f57381a0d6028bcfaa401e79cba73e72 /src | |
parent | fccf00cdad1dd8af0b85632ac8e3ae84bbc956bf (diff) |
autoschacht access
Diffstat (limited to 'src')
-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; } |