reason = LOCAL_COPY(parv[loc]);
+ if(parse_netmask_strict(host, NULL, NULL) == HM_ERROR)
+ {
+ sendto_one_notice(source_p,
+ ":[%s@%s] looks like an ill-formed IP K-line, refusing to set it",
+ user, host);
+ return;
+ }
+
if(target_server != NULL)
{
+ if (tkline_time)
+ sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
+ "%s is adding a temporary %d min. K-Line for [%s@%s] on %s [%s]",
+ get_oper_name(source_p), tkline_time / 60, user, host, target_server, reason);
+ else
+ sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
+ "%s is adding a K-Line for [%s@%s] on %s [%s]",
+ get_oper_name(source_p), user, host, target_server, reason);
+
propagate_generic(source_p, "KLINE", target_server, CAP_KLN,
"%d %s %s :%s", tkline_time, user, host, reason);
struct ConfItem *aconf = NULL;
char *oper_reason;
- if(!find_shared_conf(source_p->username, source_p->host,
- source_p->servptr->name,
- (tkline_time > 0) ? SHARED_TKLINE : SHARED_PKLINE))
- return;
-
if(!valid_user_host(source_p, user, host))
return;
return;
}
+ sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is removing the K-Line for [%s@%s] on %s",
+ get_oper_name(source_p), user, host, parv[3]);
+
propagate_generic(source_p, "UNKLINE", parv[3], CAP_UNKLN, "%s %s", user, host);
if(match(parv[3], me.name) == 0)
{
struct ConfItem *aconf;
- if(!find_shared_conf(source_p->username, source_p->host,
- source_p->servptr->name, SHARED_UNKLINE))
- return;
-
aconf = find_exact_conf_by_address(host, CONF_KILL, user);
if(aconf == NULL)
{
if(aconf == NULL && ConfigFileEntry.non_redundant_klines)
{
bits = 0;
- if((t = parse_netmask(lhost, &iphost, &bits)) != HM_HOST)
- {
- if(t == HM_IPV6)
- t = AF_INET6;
- else
- t = AF_INET;
-
- piphost = &iphost;
- }
+ t = parse_netmask_strict(lhost, &iphost, &bits);
+ piphost = &iphost;
+ if (t == HM_IPV4)
+ t = AF_INET;
+ else if (t == HM_IPV6)
+ t = AF_INET6;
else
piphost = NULL;