#include "send.h"
#include "channel.h"
#include "client.h"
-#include "common.h"
-#include "config.h"
+#include "defaults.h"
#include "class.h"
#include "ircd.h"
#include "numeric.h"
if(target_server != NULL)
{
+ if (temp_time)
+ sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is adding a temporary %d min. X-Line for [%s] on %s [%s]",
+ get_oper_name(source_p), temp_time / 60, name, target_server, reason);
+ else
+ sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is adding a permanent X-Line for [%s] on %s [%s]",
+ get_oper_name(source_p), name, target_server, reason);
+
propagate_xline(source_p, target_server, temp_time, name, "2", reason);
if(!match(target_server, me.name))
{
struct ConfItem *aconf;
- if(!find_shared_conf(source_p->username, source_p->host,
- source_p->servptr->name,
- (temp_time > 0) ? SHARED_TXLINE : SHARED_PXLINE))
- return;
-
if(!valid_xline(source_p, name, reason))
return;
aconf->lifetime = aconf->hold;
replace_old_ban(aconf);
- rb_dlinkAddAlloc(aconf, &prop_bans);
+ add_prop_ban(aconf);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s added global %d min. X-Line for [%s] [%s]",
return;
}
+ sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is removing the X-Line for [%s] on %s.",
+ get_oper_name(source_p), parv[1], parv[3]);
+
propagate_generic(source_p, "UNXLINE", parv[3], CAP_CLUSTER, "%s", parv[1]);
if(match(parv[3], me.name) == 0)
static void
handle_remote_unxline(struct Client *source_p, const char *name)
{
- if(!find_shared_conf(source_p->username, source_p->host,
- source_p->servptr->name, SHARED_UNXLINE))
- return;
-
remove_xline(source_p, name, false);
}
sendto_one_notice(source_p, ":Cannot remove global X-Line %s on specific servers", name);
return;
}
- ptr = rb_dlinkFind(aconf, &prop_bans);
- if(ptr == NULL)
+ if (!lookup_prop_ban(aconf))
return;
sendto_one_notice(source_p, ":X-Line for [%s] is removed", name);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
0,
(int)(aconf->lifetime - aconf->created));
remove_reject_mask(aconf->host, NULL);
- deactivate_conf(aconf, ptr, now);
+ deactivate_conf(aconf, now);
return;
}
else if(propagated && rb_dlink_list_length(&cluster_conf_list))