241 |
|
|
242 |
current_date = smalldate(0); |
current_date = smalldate(0); |
243 |
|
|
|
if (!valid_comment(source_p, reason, 1)) |
|
|
return 0; |
|
|
|
|
244 |
conf = conf_make(CONF_DLINE); |
conf = conf_make(CONF_DLINE); |
245 |
conf->host = xstrdup(dlhost); |
conf->host = xstrdup(dlhost); |
246 |
|
|
247 |
if (tkline_time) |
if (tkline_time) |
248 |
snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %s (%s)", |
snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %.*s (%s)", |
249 |
(int)(tkline_time/60), reason, current_date); |
(int)(tkline_time/60), REASONLEN, reason, current_date); |
250 |
else |
else |
251 |
snprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date); |
snprintf(buffer, sizeof(buffer), "%s (%.*s)", REASONLEN, reason, current_date); |
252 |
|
|
253 |
conf->reason = xstrdup(buffer); |
conf->reason = xstrdup(buffer); |
254 |
apply_dline(source_p, conf, tkline_time); |
apply_dline(source_p, conf, tkline_time); |
321 |
|
|
322 |
current_date = smalldate(0); |
current_date = smalldate(0); |
323 |
|
|
|
if (!valid_comment(source_p, reason, 1)) |
|
|
return 0; |
|
|
|
|
324 |
conf = conf_make(CONF_DLINE); |
conf = conf_make(CONF_DLINE); |
325 |
conf->host = xstrdup(dlhost); |
conf->host = xstrdup(dlhost); |
326 |
|
|
327 |
if (tkline_time) |
if (tkline_time) |
328 |
snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %s (%s)", |
snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %.*s (%s)", |
329 |
(int)(tkline_time/60), reason, current_date); |
(int)(tkline_time/60), REASONLEN, reason, current_date); |
330 |
else |
else |
331 |
snprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date); |
snprintf(buffer, sizeof(buffer), "%.*s (%s)", REASONLEN, reason, current_date); |
332 |
|
|
333 |
conf->reason = xstrdup(buffer); |
conf->reason = xstrdup(buffer); |
334 |
apply_dline(source_p, conf, tkline_time); |
apply_dline(source_p, conf, tkline_time); |