]> jfr.im git - solanum.git/blobdiff - modules/m_dline.c
Add umode +I to allow users to hide their idle time (#220)
[solanum.git] / modules / m_dline.c
index 3f9a3d1661026feb0311221cd492a52baa1e55ba..5960c8a2f8414cac486b12c3bc4a0980c144daa2 100644 (file)
@@ -280,7 +280,6 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char *
        aconf->status = CONF_DLINE;
        aconf->created = rb_current_time();
        aconf->host = rb_strdup(dlhost);
-       aconf->passwd = rb_strdup(reason);
        aconf->info.oper = operhash_add(get_oper_name(source_p));
 
        if(strlen(reason) > BANREASONLEN)
@@ -296,6 +295,8 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char *
                        aconf->spasswd = rb_strdup(oper_reason);
        }
 
+       aconf->passwd = rb_strdup(reason);
+
        if(tdline_time > 0)
        {
                aconf->hold = rb_current_time() + tdline_time;
@@ -303,7 +304,7 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char *
 
                if(EmptyString(oper_reason))
                {
-                       sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                               "%s added temporary %d min. D-Line for [%s] [%s]",
                                               get_oper_name(source_p), tdline_time / 60,
                                               aconf->host, reason);
@@ -312,7 +313,7 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char *
                }
                else
                {
-                       sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                               "%s added temporary %d min. D-Line for [%s] [%s|%s]",
                                               get_oper_name(source_p), tdline_time / 60,
                                               aconf->host, reason, oper_reason);
@@ -333,7 +334,7 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char *
 
                if(EmptyString(oper_reason))
                {
-                       sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                               "%s added D-Line for [%s] [%s]",
                                               get_oper_name(source_p), aconf->host, reason);
                        ilog(L_KLINE, "D %s 0 %s %s",
@@ -341,7 +342,7 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char *
                }
                else
                {
-                       sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                               "%s added D-Line for [%s] [%s|%s]",
                                               get_oper_name(source_p), aconf->host, reason, oper_reason);
                        ilog(L_KLINE, "D %s 0 %s %s|%s",
@@ -378,7 +379,7 @@ apply_undline(struct Client *source_p, const char *cidr)
                sendto_one(source_p,
                           ":%s NOTICE %s :Un-dlined [%s] from temporary D-lines",
                           me.name, source_p->name, buf);
-               sendto_realops_snomask(SNO_GENERAL, L_ALL,
+               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                       "%s has removed the temporary D-Line for: [%s]",
                                       get_oper_name(source_p), buf);
                ilog(L_KLINE, "UD %s %s", get_oper_name(source_p), buf);
@@ -389,7 +390,7 @@ apply_undline(struct Client *source_p, const char *cidr)
 
        sendto_one(source_p, ":%s NOTICE %s :D-Line for [%s] is removed", me.name, source_p->name,
                   aconf->host);
-       sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s has removed the D-Line for: [%s]",
+       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s has removed the D-Line for: [%s]",
                               get_oper_name(source_p), aconf->host);
        ilog(L_KLINE, "UD %s %s", get_oper_name(source_p), aconf->host);
        delete_one_address_conf(aconf->host, aconf);