X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/968dee680f777012773c21a23dd698b693634104..d4f7eb4ce6a0c5a703ddb0f5f5bfaf5d2037e605:/ircd/s_user.c diff --git a/ircd/s_user.c b/ircd/s_user.c index 5ac5f56e..1b1e748a 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -97,7 +97,7 @@ int user_modes[256] = { 0, /* d */ 0, /* e */ 0, /* f */ - UMODE_CALLERID, /* g */ + 0, /* g */ 0, /* h */ UMODE_INVISIBLE, /* i */ 0, /* j */ @@ -213,25 +213,25 @@ authd_check(struct Client *client_p, struct Client *source_p) switch(source_p->preClient->auth.cause) { - case 'B': /* Blacklists */ + case 'B': /* DNSBL */ { - struct BlacklistStats *stats; - char *blacklist = source_p->preClient->auth.data; + struct DNSBLEntryStats *stats; + char *dnsbl_name = source_p->preClient->auth.data; - if(bl_stats != NULL) - if((stats = rb_dictionary_retrieve(bl_stats, blacklist)) != NULL) + if(dnsbl_stats != NULL) + if((stats = rb_dictionary_retrieve(dnsbl_stats, dnsbl_name)) != NULL) stats->hits++; if(IsExemptKline(source_p) || IsConfExemptDNSBL(aconf)) { sendto_one_notice(source_p, ":*** Your IP address %s is listed in %s, but you are exempt", - source_p->sockhost, blacklist); + source_p->sockhost, dnsbl_name); break; } sendto_realops_snomask(SNO_REJ, L_NETWIDE, "Listed on DNSBL %s: %s (%s@%s) [%s] [%s]", - blacklist, source_p->name, source_p->username, source_p->host, + dnsbl_name, source_p->name, source_p->username, source_p->host, IsIPSpoof(source_p) ? "255.255.255.255" : source_p->sockhost, source_p->info); @@ -239,9 +239,9 @@ authd_check(struct Client *client_p, struct Client *source_p) me.name, source_p->name, reason); sendto_one_notice(source_p, ":*** Your IP address %s is listed in %s", - source_p->sockhost, blacklist); - add_reject(source_p, NULL, NULL, NULL, "Banned (DNS blacklist)"); - exit_client(client_p, source_p, &me, "Banned (DNS blacklist)"); + source_p->sockhost, dnsbl_name); + add_reject(source_p, NULL, NULL, NULL, "Banned (listed in a DNSBL)"); + exit_client(client_p, source_p, &me, "Banned (listed in a DNSBL)"); reject = true; } break; @@ -927,7 +927,7 @@ report_and_set_user_flags(struct Client *source_p, struct ConfItem *aconf) if(IsConfExemptDNSBL(aconf)) /* kline exempt implies this, don't send both */ if(!IsConfExemptKline(aconf)) - sendto_one_notice(source_p, ":*** You are exempt from DNS blacklists"); + sendto_one_notice(source_p, ":*** You are exempt from DNSBL listings"); /* If this user is exempt from user limits set it F lined" */ if(IsConfExemptLimits(aconf)) @@ -1237,6 +1237,9 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char source_p->umodes &= ~UMODE_ADMIN; } + if(MyClient(source_p)) + source_p->handler = IsOperGeneral(source_p) ? OPER_HANDLER : CLIENT_HANDLER; + /* let modules providing usermodes know that we've changed our usermode --nenolod */ hdata.client = source_p; hdata.oldumodes = setflags; @@ -1439,6 +1442,8 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p) hdata.oldsnomask = oldsnomask; call_hook(h_umode_changed, &hdata); + source_p->handler = IsOperGeneral(source_p) ? OPER_HANDLER : CLIENT_HANDLER; + sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s (%s!%s@%s) is now an operator", oper_p->name, source_p->name, source_p->username, source_p->host);