X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/2cfb7214ee9a5ae84bc69943fd0656af640bfa48..8ee12f0c437eec8aa42af7b350c7e2a3ccafedbc:/modules/m_dline.c?ds=inline diff --git a/modules/m_dline.c b/modules/m_dline.c index ef7c1cdc..e54bacff 100644 --- a/modules/m_dline.c +++ b/modules/m_dline.c @@ -263,16 +263,6 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char * return 0; } - /* Look for an oper reason */ - if((oper_reason = strchr(reason, '|')) != NULL) - { - *oper_reason = '\0'; - oper_reason++; - - if(!EmptyString(oper_reason)) - aconf->spasswd = rb_strdup(oper_reason); - } - if(ConfigFileEntry.non_redundant_klines) { if((aconf = find_dline((struct sockaddr *)&daddr, t)) != NULL) @@ -302,6 +292,16 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char * aconf->status = CONF_DLINE; aconf->host = rb_strdup(dlhost); + /* Look for an oper reason */ + if((oper_reason = strchr(reason, '|')) != NULL) + { + *oper_reason = '\0'; + oper_reason++; + + if(!EmptyString(oper_reason)) + aconf->spasswd = rb_strdup(oper_reason); + } + if(tdline_time > 0) { rb_snprintf(dlbuffer, sizeof(dlbuffer), @@ -339,7 +339,7 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char * { rb_snprintf(dlbuffer, sizeof(dlbuffer), "%s (%s)", reason, current_date); aconf->passwd = rb_strdup(dlbuffer); - add_conf_by_address(aconf->host, CONF_DLINE, NULL, aconf); + add_conf_by_address(aconf->host, CONF_DLINE, NULL, NULL, aconf); write_confitem(DLINE_TYPE, source_p, NULL, aconf->host, reason, oper_reason, current_date, 0); }