109 |
if (tkline_time) |
if (tkline_time) |
110 |
{ |
{ |
111 |
conf->until = CurrentTime + tkline_time; |
conf->until = CurrentTime + tkline_time; |
112 |
|
|
113 |
|
if (IsClient(source_p)) |
114 |
|
sendto_one_notice(source_p, &me, ":Added temporary %d min. D-Line [%s]", |
115 |
|
tkline_time/60, conf->host); |
116 |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
117 |
"%s added temporary %d min. D-Line for [%s] [%s]", |
"%s added temporary %d min. D-Line for [%s] [%s]", |
118 |
get_oper_name(source_p), tkline_time/60, |
get_oper_name(source_p), tkline_time/60, |
119 |
conf->host, conf->reason); |
conf->host, conf->reason); |
|
sendto_one_notice(source_p, &me, ":Added temporary %d min. D-Line [%s]", |
|
|
tkline_time/60, conf->host); |
|
120 |
ilog(LOG_TYPE_DLINE, "%s added temporary %d min. D-Line for [%s] [%s]", |
ilog(LOG_TYPE_DLINE, "%s added temporary %d min. D-Line for [%s] [%s]", |
121 |
get_oper_name(source_p), tkline_time/60, conf->host, conf->reason); |
get_oper_name(source_p), tkline_time/60, conf->host, conf->reason); |
122 |
} |
} |
123 |
else |
else |
124 |
{ |
{ |
125 |
|
if (IsClient(source_p)) |
126 |
|
sendto_one_notice(source_p, &me, ":Added D-Line [%s]", conf->host); |
127 |
|
|
128 |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
129 |
"%s added D-Line for [%s] [%s]", |
"%s added D-Line for [%s] [%s]", |
130 |
get_oper_name(source_p), conf->host, conf->reason); |
get_oper_name(source_p), conf->host, conf->reason); |
|
sendto_one_notice(source_p, &me, ":Added D-Line [%s]", conf->host); |
|
131 |
ilog(LOG_TYPE_DLINE, "%s added D-Line for [%s] [%s]", |
ilog(LOG_TYPE_DLINE, "%s added D-Line for [%s] [%s]", |
132 |
get_oper_name(source_p), conf->host, conf->reason); |
get_oper_name(source_p), conf->host, conf->reason); |
133 |
|
|
278 |
return 0; |
return 0; |
279 |
|
|
280 |
/* parv[0] parv[1] parv[2] parv[3] parv[4] */ |
/* parv[0] parv[1] parv[2] parv[3] parv[4] */ |
281 |
/* oper target_server tkline_time host reason */ |
/* command target_server tkline_time host reason */ |
282 |
sendto_match_servs(source_p, parv[1], CAP_DLN, |
sendto_match_servs(source_p, parv[1], CAP_DLN, |
283 |
"DLINE %s %s %s :%s", |
"DLINE %s %s %s :%s", |
284 |
parv[1], parv[2], parv[3], parv[4]); |
parv[1], parv[2], parv[3], parv[4]); |
295 |
source_p->username, source_p->host, |
source_p->username, source_p->host, |
296 |
SHARED_DLINE)) |
SHARED_DLINE)) |
297 |
{ |
{ |
|
if (!IsClient(source_p)) |
|
|
return 0; |
|
|
|
|
298 |
if ((t = parse_netmask(dlhost, NULL, &bits)) == HM_HOST) |
if ((t = parse_netmask(dlhost, NULL, &bits)) == HM_HOST) |
299 |
{ |
{ |
300 |
if ((target_p = find_chasing(source_p, dlhost)) == NULL) |
if ((target_p = find_chasing(source_p, dlhost)) == NULL) |
302 |
|
|
303 |
if (!MyConnect(target_p)) |
if (!MyConnect(target_p)) |
304 |
{ |
{ |
305 |
sendto_one_notice(source_p, &me, ":Cannot DLINE nick on another server"); |
if (IsClient(source_p)) |
306 |
|
sendto_one_notice(source_p, &me, ":Cannot DLINE nick on another server"); |
307 |
return 0; |
return 0; |
308 |
} |
} |
309 |
|
|
310 |
if (IsExemptKline(target_p)) |
if (IsExemptKline(target_p)) |
311 |
{ |
{ |
312 |
sendto_one_notice(source_p, &me, ":%s is E-lined", target_p->name); |
if (IsClient(source_p)) |
313 |
|
sendto_one_notice(source_p, &me, ":%s is E-lined", target_p->name); |
314 |
return 0; |
return 0; |
315 |
} |
} |
316 |
|
|
324 |
|
|
325 |
if (bits < 8) |
if (bits < 8) |
326 |
{ |
{ |
327 |
sendto_one_notice(source_p, &me, ":For safety, bitmasks less than 8 require conf access."); |
if (IsClient(source_p)) |
328 |
|
sendto_one_notice(source_p, &me, ":For safety, bitmasks less than 8 require conf access."); |
329 |
return 0; |
return 0; |
330 |
} |
} |
331 |
|
|
338 |
|
|
339 |
if ((conf = find_dline_conf(&daddr, aftype))) |
if ((conf = find_dline_conf(&daddr, aftype))) |
340 |
{ |
{ |
341 |
|
if (!IsClient(source_p)) |
342 |
|
return 0; |
343 |
|
|
344 |
creason = conf->reason ? conf->reason : def_reason; |
creason = conf->reason ? conf->reason : def_reason; |
345 |
if (IsConfExemptKline(conf)) |
if (IsConfExemptKline(conf)) |
346 |
sendto_one_notice(source_p, &me, ":[%s] is (E)d-lined by [%s] - %s", |
sendto_one_notice(source_p, &me, ":[%s] is (E)d-lined by [%s] - %s", |