From: Michael Poole Date: Thu, 5 Mar 2009 04:28:58 +0000 (-0500) Subject: Check account-based alerts for all users, not just staff. X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=c07aefd6ea536750da47b9c748fd1a337edc9bbf Check account-based alerts for all users, not just staff. src/opserv.c (opserv_staff_alert): Remove calls to alert_check_user. (opserv_auth_alert): New function to replace that check. (init_opserv): Register opserv_auth_alert(). --- diff --git a/src/opserv.c b/src/opserv.c index 8e1efcc..43cbb73 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -3968,8 +3968,13 @@ opserv_staff_alert(struct userNode *user, UNUSED_ARG(struct handle_info *old_han send_channel_notice(opserv_conf.staff_auth_channel, opserv, IDENT_FORMAT" authed to %s account %s", IDENT_DATA(user), type, user->handle_info->handle); else send_channel_notice(opserv_conf.staff_auth_channel, opserv, "%s [%s@%s] authed to %s account %s", user->nick, user->ident, user->hostname, type, user->handle_info->handle); +} - dict_foreach(opserv_account_alerts, alert_check_user, user); +static void +opserv_auth_alert(struct userNode *user, UNUSED_ARG(struct handle_info *old_handle)) +{ + if (!user->uplink->burst && user->handle_info) + dict_foreach(opserv_account_alerts, alert_check_user, user); } static MODCMD_FUNC(cmd_log) @@ -4370,6 +4375,7 @@ init_opserv(const char *nick) reg_del_channel_func(opserv_channel_delete); reg_join_func(opserv_join_check); reg_auth_func(opserv_staff_alert); + reg_auth_func(opserv_auth_alert); opserv_db_init(); saxdb_register("OpServ", opserv_saxdb_read, opserv_saxdb_write);