+static void
+possibly_remove_lower_forward(struct Client *fakesource_p, int mems,
+ struct Channel *chptr, rb_dlink_list *banlist, int mchar,
+ const char *mask, const char *forward)
+{
+ struct Ban *actualBan;
+ rb_dlink_node *ptr;
+
+ RB_DLINK_FOREACH(ptr, banlist->head)
+ {
+ actualBan = ptr->data;
+ if(!irccmp(actualBan->banstr, mask) &&
+ (actualBan->forward == NULL ||
+ irccmp(actualBan->forward, forward) < 0))
+ {
+ sendto_channel_local(fakesource_p, mems, chptr, ":%s MODE %s -%c %s%s%s",
+ fakesource_p->name,
+ chptr->chname,
+ mchar,
+ actualBan->banstr,
+ actualBan->forward ? "$" : "",
+ actualBan->forward ? actualBan->forward : "");
+ rb_dlinkDelete(&actualBan->node, banlist);
+ free_ban(actualBan);
+ return;
+ }
+ }