X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fopserv.c;h=eea1adaaa44fe7d7f166295d04865d632b307f09;hb=b08752358c597459faadc8a937f2d6bcb88e683e;hp=d6aedf50ed7fe9ee83a46902ea13026ba93d8c60;hpb=839ab9c7c30c63c0bb584da4ab6fe41f54f22ac4;p=srvx.git diff --git a/src/opserv.c b/src/opserv.c index d6aedf5..eea1ada 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -266,6 +266,7 @@ static dict_t opserv_hostinfo_dict; /* data is struct opserv_hostinfo* */ static dict_t opserv_user_alerts; /* data is struct opserv_user_alert* */ static dict_t opserv_nick_based_alerts; /* data is struct opserv_user_alert* */ static dict_t opserv_channel_alerts; /* data is struct opserv_user_alert* */ +static dict_t opserv_account_alerts; /* data is struct opserv_user_alert* */ static struct module *opserv_module; static struct log_type *OS_LOG; static unsigned int new_user_flood; @@ -2595,6 +2596,8 @@ opserv_add_user_alert(struct userNode *req, const char *name, opserv_alert_react dict_insert(opserv_channel_alerts, name_dup, alert); if (alert->discrim->mask_nick) dict_insert(opserv_nick_based_alerts, name_dup, alert); + if (alert->discrim->accountmask || alert->discrim->authed != -1) + dict_insert(opserv_account_alerts, name_dup, alert); return alert; } @@ -3837,6 +3840,8 @@ 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 MODCMD_FUNC(cmd_log) @@ -3972,10 +3977,11 @@ static MODCMD_FUNC(cmd_delalert) for (i=1; i