diff options
author | Tim Angus <tim@ngus.net> | 2009-10-04 23:56:03 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:39 +0000 |
commit | 3c0790c7ec1bb2802ddd6d6cae713284b38bfd0a (patch) | |
tree | 3e181e913b0f4e9b65de607da5cec54209063fab /src/master | |
parent | cc0ae35e3874eb382fe5897e530c86d5a8de7b93 (diff) |
* Hack to help master server react quicker in some 'situations'
Diffstat (limited to 'src/master')
-rw-r--r-- | src/master/master.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/master/master.c b/src/master/master.c index 11cec6a5..fd6e66f0 100644 --- a/src/master/master.c +++ b/src/master/master.c @@ -555,7 +555,7 @@ typedef struct char address[ ADDRESS_LENGTH ]; // Dotted quad } ignoreAddress_t; -#define PARSE_INTERVAL 60 // seconds +#define PARSE_INTERVAL 10 // seconds static time_t lastParseTime = 0; static int numIgnoreAddresses = 0; @@ -787,15 +787,24 @@ int main (int argc, const char* argv []) continue; } - // Ignore abusers - if( ignoreAddress( inet_ntoa( address.sin_addr ) ) ) - continue; - // If we may have to print something, rebuild the peer address buffer if (max_msg_level != MSG_NOPRINT) snprintf (peer_address, sizeof (peer_address), "%s:%hu", inet_ntoa (address.sin_addr), ntohs (address.sin_port)); + // Ignore abusers + if( ignoreAddress( inet_ntoa( address.sin_addr ) ) ) + { + server_t* abuser = Sv_GetByAddr( &address, qfalse ); + if( abuser != NULL ) + { + abuser->timeout = crt_time - 1; + Sv_GetByAddr( &address, qfalse ); + MsgPrint( MSG_WARNING, "WARNING: removing abuser %s\n", peer_address ); + } + continue; + } + // We print the packet contents if necessary // TODO: print the current time here if (max_msg_level >= MSG_DEBUG) |