Changeset 801 for trunk/ithildin/modules/ircd/addons/throttle.c
- Timestamp:
- 02/12/07 05:52:32 (5 years ago)
- File:
-
- 1 edited
-
trunk/ithildin/modules/ircd/addons/throttle.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ithildin/modules/ircd/addons/throttle.c
r787 r801 61 61 static void destroy_throttle(throttle_t *); 62 62 63 HOOK_FUNCTION(throttle_ stage1_hook);63 HOOK_FUNCTION(throttle_connected_hook); 64 64 HOOK_FUNCTION(throttle_conf_hook); 65 65 HOOK_FUNCTION(throttle_timer_hook); … … 106 106 #define THROTTLE_ERRMSG \ 107 107 "Your host is trying to (re)connect too fast -- throttled." 108 HOOK_FUNCTION(throttle_ stage1_hook) {108 HOOK_FUNCTION(throttle_connected_hook) { 109 109 connection_t *cp = (connection_t *)data; 110 110 throttle_t *tp = find_throttle(isock_raddr(cp->sock)); … … 164 164 165 165 if (tp->banned + len >= me.now) { 166 if ((ap = find_acl(ACL_STAGE_CONNECT , ACL_DENY, cp->host,166 if ((ap = find_acl(ACL_STAGE_CONNECTED, ACL_DENY, cp->host, 167 167 throttle_acl_type, ACL_DEFAULT_RULE, NULL, NULL)) == NULL) { 168 ap = create_acl(ACL_STAGE_CONNECT , ACL_DENY, cp->host,168 ap = create_acl(ACL_STAGE_CONNECTED, ACL_DENY, cp->host, 169 169 throttle_acl_type, ACL_DEFAULT_RULE); 170 170 ap->reason = strdup(THROTTLE_ERRMSG); … … 272 272 LIST_ALLOC(throttle.list); 273 273 274 add_hook_before(ircd.events. stage1_connect, throttle_stage1_hook,275 acl_stage1_hook);274 add_hook_before(ircd.events.connection_connected, 275 throttle_connected_stage_hook, acl_connected_stage_hook); 276 276 add_hook(me.events.read_conf, throttle_conf_hook); 277 277 … … 288 288 LIST_FREE(throttle.list); 289 289 290 remove_hook(ircd.events.stage1_connect, throttle_stage1_hook); 290 remove_hook(ircd.events.connection_connected, 291 throttle_connected_stage_hook); 291 292 remove_hook(me.events.read_conf, throttle_conf_hook); 292 293 }
Note: See TracChangeset
for help on using the changeset viewer.
