diff --git a/include/struct.h b/include/struct.h index ce42b5f4d..ae4ef7426 100644 --- a/include/struct.h +++ b/include/struct.h @@ -321,6 +321,7 @@ typedef enum ClientStatus { #define CLIENT_FLAG_DCCBLOCK 0x04000000 /**< Block all DCC send requests */ #define CLIENT_FLAG_MAP 0x08000000 /**< Show this entry in /MAP (only used in map module) */ #define CLIENT_FLAG_PINGWARN 0x10000000 /**< Server ping warning (remote server slow with responding to PINGs) */ +#define CLIENT_FLAG_NOHANDSHAKEDELAY 0x20000000 /**< No handshake delay */ /** @} */ #define SNO_DEFOPER "+kscfvGqobS" @@ -421,6 +422,7 @@ typedef enum ClientStatus { #define IsOutgoing(x) ((x)->flags & CLIENT_FLAG_OUTGOING) #define IsPingSent(x) ((x)->flags & CLIENT_FLAG_PINGSENT) #define IsPingWarning(x) ((x)->flags & CLIENT_FLAG_PINGWARN) +#define IsNoHandshakeDelay(x) ((x)->flags & CLIENT_FLAG_NOHANDSHAKEDELAY) #define IsProtoctlReceived(x) ((x)->flags & CLIENT_FLAG_PROTOCTL) #define IsQuarantined(x) ((x)->flags & CLIENT_FLAG_QUARANTINE) #define IsShunned(x) ((x)->flags & CLIENT_FLAG_SHUNNED) @@ -451,6 +453,7 @@ typedef enum ClientStatus { #define SetOutgoing(x) do { (x)->flags |= CLIENT_FLAG_OUTGOING; } while(0) #define SetPingSent(x) do { (x)->flags |= CLIENT_FLAG_PINGSENT; } while(0) #define SetPingWarning(x) do { (x)->flags |= CLIENT_FLAG_PINGWARN; } while(0) +#define SetNoHandshakeDelay(x) do { (x)->flags |= CLIENT_FLAG_NOHANDSHAKEDELAY; } while(0) #define SetProtoctlReceived(x) do { (x)->flags |= CLIENT_FLAG_PROTOCTL; } while(0) #define SetQuarantined(x) do { (x)->flags |= CLIENT_FLAG_QUARANTINE; } while(0) #define SetShunned(x) do { (x)->flags |= CLIENT_FLAG_SHUNNED; } while(0) @@ -480,6 +483,7 @@ typedef enum ClientStatus { #define ClearOutgoing(x) do { (x)->flags &= ~CLIENT_FLAG_OUTGOING; } while(0) #define ClearPingSent(x) do { (x)->flags &= ~CLIENT_FLAG_PINGSENT; } while(0) #define ClearPingWarning(x) do { (x)->flags &= ~CLIENT_FLAG_PINGWARN; } while(0) +#define ClearNoHandshakeDelay(x) do { (x)->flags &= ~CLIENT_FLAG_NOHANDSHAKEDELAY; } while(0) #define ClearProtoctlReceived(x) do { (x)->flags &= ~CLIENT_FLAG_PROTOCTL; } while(0) #define ClearQuarantined(x) do { (x)->flags &= ~CLIENT_FLAG_QUARANTINE; } while(0) #define ClearShunned(x) do { (x)->flags &= ~CLIENT_FLAG_SHUNNED; } while(0) diff --git a/src/modules/blacklist.c b/src/modules/blacklist.c index d38ce3e6e..7cc99cdff 100644 --- a/src/modules/blacklist.c +++ b/src/modules/blacklist.c @@ -558,9 +558,15 @@ int blacklist_start_check(Client *client) { Blacklist *bl; - /* If the user is on 'except blacklist' then don't bother checking... */ if (find_tkl_exception(TKL_BLACKLIST, client)) + { + /* If the user is exempt from DNSBL checking then: + * 1) Don't bother checking DNSBL's + * 2) Disable handshake delay for this user, since it serves no purpose. + */ + SetNoHandshakeDelay(client); return 0; + } if (!BLUSER(client)) { diff --git a/src/parse.c b/src/parse.c index 8e4c35654..33d3af455 100644 --- a/src/parse.c +++ b/src/parse.c @@ -105,7 +105,7 @@ void parse_client_queued(Client *client) return; /* we delay processing of data until identd has replied */ if (!IsUser(client) && !IsServer(client) && (iConf.handshake_delay > 0) && - (TStime() - client->local->firsttime < iConf.handshake_delay)) + !IsNoHandshakeDelay(client) && (TStime() - client->local->firsttime < iConf.handshake_delay)) { return; /* we delay processing of data until set::handshake-delay is reached */ }