return 1;
}
-static int
+static void
global_process_user(struct userNode *user)
{
if(IsLocal(user) || self->uplink->burst || user->uplink->burst)
- return 0;
+ return;
send_messages(user, MESSAGE_RECIPIENT_LUSERS, 1);
/* only alert on new usercount if the record was broken in the last
global_message(MESSAGE_RECIPIENT_OPERS, message);
last_max_alert = now;
}
-
- return 0;
}
static void
typedef void (*server_link_func_t) (struct server *server);
void reg_server_link_func(server_link_func_t handler);
-typedef int (*new_user_func_t) (struct userNode *user);
+typedef void (*new_user_func_t) (struct userNode *user);
void reg_new_user_func(new_user_func_t handler);
typedef void (*del_user_func_t) (struct userNode *user, struct userNode *killer, const char *why);
void reg_del_user_func(del_user_func_t handler);
free(txt);
}
-static int
+static void
blacklist_check_user(struct userNode *user)
{
static const char *hexdigits = "0123456789abcdef";
/* Users added during burst should not be checked. */
if (user->uplink->burst)
- return 0;
+ return;
/* Users with bogus IPs are probably service bots. */
if (!irc_in_addr_is_valid(user->ip))
- return 0;
+ return;
/* Check local file-based blacklist. */
irc_ntop(ip, sizeof(ip), &user->ip);
}
dnsbl_len = 48;
} else {
- return 0;
+ return;
}
/* Start a lookup for the appropriate hostname in each DNSBL. */
strcpy(data->zone_name, zone);
}
}
- return 0;
}
static void
SNOOP("$bKICK$b %s from %s by %s", victim->nick, chan->name, (kicker ? kicker->nick : "some server"));
}
-static int
+static void
snoop_new_user(struct userNode *user) {
- if (!snoop_cfg.enabled) return 0;
- if (user->uplink->burst && !snoop_cfg.show_bursts) return 0;
+ if (!snoop_cfg.enabled) return;
+ if (user->uplink->burst && !snoop_cfg.show_bursts) return;
UPDATE_TIMESTAMP();
SNOOP("$bNICK$b %s %s@%s [%s] on %s", user->nick, user->ident, user->hostname, irc_ntoa(&user->ip), user->uplink->name);
- return 0;
}
static void
}
}
-static int
+static void
sockcheck_new_user(struct userNode *user) {
/* If they have a bum IP, or are bursting in, don't proxy-check or G-line them. */
if (irc_in_addr_is_valid(user->ip)
&& !irc_in_addr_is_loopback(user->ip)
&& !user->uplink->burst)
sockcheck_queue_address(user->ip);
- return 0;
}
static void
nickserv_reclaim(user, ni, nickserv_conf.auto_reclaim_action);
}
-static int
+static void
check_user_nick(struct userNode *user) {
struct nick_info *ni;
user->modes &= ~FLAGS_REGNICK;
if (!(ni = get_nick_info(user->nick)))
- return 0;
+ return;
if (user->handle_info == ni->owner) {
user->modes |= FLAGS_REGNICK;
irc_regnick(user);
- return 0;
+ return;
}
if (nickserv_conf.warn_nick_owned)
send_message(user, nickserv, "NSMSG_RECLAIM_WARN", ni->nick, ni->owner->handle);
if (nickserv_conf.auto_reclaim_action == RECLAIM_NONE)
- return 0;
+ return;
if (nickserv_conf.auto_reclaim_delay)
timeq_add(now + nickserv_conf.auto_reclaim_delay, nickserv_reclaim_p, user);
else
nickserv_reclaim(user, ni, nickserv_conf.auto_reclaim_action);
- return 0;
-}
-
-int
-handle_new_user(struct userNode *user)
-{
- return check_user_nick(user);
}
void
{
unsigned int i;
NS_LOG = log_register_type("NickServ", "file:nickserv.log");
- reg_new_user_func(handle_new_user);
+ reg_new_user_func(check_user_nick);
reg_nick_change_func(handle_nick_change);
reg_del_user_func(nickserv_remove_user);
reg_account_func(handle_account);
static int alert_check_user(const char *key, void *data, void *extra);
-static int
+static void
opserv_new_user_check(struct userNode *user)
{
struct opserv_hostinfo *ohi;
/* Check to see if we should ignore them entirely. */
if (IsLocal(user) || IsService(user))
- return 0;
+ return;
/* Check for alerts, and stop if we find one that kills them. */
if (dict_foreach(opserv_user_alerts, alert_check_user, user))
- return 1;
+ return;
/* Gag them if appropriate. */
for (gag = gagList; gag; gag = gag->next) {
gline_add(opserv->nick, target, opserv_conf.clone_gline_duration, "AUTO Excessive connections from a single host.", now, now, 1);
}
}
-
- return 0;
}
static void
if (dummy) uNode->modes |= FLAGS_DUMMY;
if (stamp) call_account_func(uNode, NULL, 0, stamp);
if (IsLocal(uNode)) irc_user(uNode);
- for (nn=0; (nn<nuf_used) && !uNode->dead; nn++) {
- if (nuf_list[nn](uNode)) break;
- }
+ for (nn=0; (nn<nuf_used) && !uNode->dead; nn++)
+ nuf_list[nn](uNode);
return uNode;
}
if (IsLocal(uNode))
irc_user(uNode);
for (n=0; (n<nuf_used) && !uNode->dead; n++)
- if (nuf_list[n](uNode))
- break;
+ nuf_list[n](uNode);
return uNode;
}