- 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);
- write_confitem(DLINE_TYPE, source_p, NULL, aconf->host, reason,
- oper_reason, current_date, 0);
+ add_conf_by_address(aconf->host, CONF_DLINE, NULL, NULL, aconf);
+
+ bandb_add(BANDB_DLINE, source_p, aconf->host, NULL,
+ reason, EmptyString(aconf->spasswd) ? NULL : aconf->spasswd, 0);
+
+ if(EmptyString(oper_reason))
+ {
+ sendto_realops_snomask(SNO_GENERAL, L_ALL,
+ "%s added D-Line for [%s] [%s]",
+ get_oper_name(source_p), aconf->host, reason);
+ ilog(L_KLINE, "D %s 0 %s %s",
+ get_oper_name(source_p), aconf->host, reason);
+ }
+ else
+ {
+ sendto_realops_snomask(SNO_GENERAL, L_ALL,
+ "%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",
+ get_oper_name(source_p),
+ aconf->host, reason, oper_reason);
+ }