/* mo_unresv() * parv[0] = sender prefix * parv[1] = channel/nick to unforbid */ static void mo_unresv(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { char *resv = NULL; char *reason = NULL; char *target_server = NULL; /* UNRESV #channel ON irc.server.com */ /* UNRESV kiddie ON irc.server.com */ if(parse_aline("UNRESV", source_p, parc, parv, 0, &resv, NULL, NULL, &target_server, &reason) < 0) return; if(target_server != NULL) { sendto_match_servs(source_p, target_server, CAP_CLUSTER, "UNRESV %s %s", target_server, resv); /* Allow ON to apply local unresv as well if it matches */ if(!match(target_server, me.name)) return; } else cluster_a_line(source_p, "UNRESV", CAP_KLN, SHARED_UNRESV, resv); remove_resv(source_p, resv); }
/* ms_unresv() * parv[0] = sender prefix * parv[1] = target server * parv[2] = resv to remove */ static void ms_unresv(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { if((parc != 3) || EmptyString(parv[2])) return; sendto_match_servs(source_p, parv[1], CAP_CLUSTER, "UNRESV %s %s", parv[1], parv[2]); if(!IsClient(source_p) || !match(parv[1], me.name)) return; if(find_matching_name_conf(ULINE_TYPE, source_p->servptr->name, source_p->username, source_p->realhost, SHARED_UNRESV)) remove_resv(source_p, parv[2]); }
/* mo_unresv() * parv[0] = sender prefix * parv[1] = channel/nick to unforbid */ static void mo_unresv (struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { if (parc < 2) { sendto_one (source_p, form_str (ERR_NEEDMOREPARAMS), me.name, source_p->name, "UNRESV"); return; } cluster_unresv (source_p, parv[1]); remove_resv (source_p, parv[1], 0); }
/* ms_unresv() * parv[0] = sender prefix * parv[1] = target server * parv[2] = resv to remove */ static void ms_unresv (struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { if ((parc != 3) || EmptyString (parv[2])) return; sendto_match_servs (source_p, parv[1], CAP_CLUSTER, "UNRESV %s %s", parv[1], parv[2]); if (!match (me.name, parv[1])) return; if (!IsPerson (source_p)) return; remove_resv (source_p, parv[2], 1); }