+static void
+apply_prop_kline(struct Client *source_p, struct ConfItem *aconf,
+ const char *reason, const char *oper_reason, int tkline_time)
+{
+ aconf->flags |= CONF_FLAGS_MYOPER | CONF_FLAGS_TEMPORARY;
+ aconf->hold = rb_current_time() + tkline_time;
+ aconf->lifetime = aconf->hold;
+
+ replace_old_ban(aconf);
+
+ rb_dlinkAddAlloc(aconf, &prop_bans);
+ add_conf_by_address(aconf->host, CONF_KILL, aconf->user, NULL, aconf);
+
+ /* no oper reason.. */
+ if(EmptyString(oper_reason))
+ {
+ sendto_realops_snomask(SNO_GENERAL, L_ALL,
+ "%s added global %d min. K-Line for [%s@%s] [%s]",
+ get_oper_name(source_p), tkline_time / 60,
+ aconf->user, aconf->host, reason);
+ ilog(L_KLINE, "K %s %d %s %s %s",
+ get_oper_name(source_p), tkline_time / 60, aconf->user, aconf->host, reason);
+ }
+ else
+ {
+ sendto_realops_snomask(SNO_GENERAL, L_ALL,
+ "%s added global %d min. K-Line for [%s@%s] [%s|%s]",
+ get_oper_name(source_p), tkline_time / 60,
+ aconf->user, aconf->host, reason, oper_reason);
+ ilog(L_KLINE, "K %s %d %s %s %s|%s",
+ get_oper_name(source_p), tkline_time / 60,
+ aconf->user, aconf->host, reason, oper_reason);
+ }
+
+ sendto_one_notice(source_p, ":Added global %d min. K-Line [%s@%s]",
+ tkline_time / 60, aconf->user, aconf->host);
+
+ sendto_server(NULL, NULL, CAP_BAN|CAP_TS6, NOCAPS,
+ ":%s BAN K %s %s %lu %d %d * :%s%s%s",
+ source_p->id, aconf->user, aconf->host,
+ (unsigned long)aconf->created,
+ (int)(aconf->hold - aconf->created),
+ (int)(aconf->lifetime - aconf->created),
+ reason,
+ oper_reason ? "|" : "",
+ oper_reason ? oper_reason : "");
+}
+