/*
- * IRC - Internet Relay Chat, ircd/m_tmpl.c
+ * IRC - Internet Relay Chat, ircd/m_clearmode.c
* Copyright (C) 1990 Jarkko Oikarinen and
* University of Oulu, Computing Center
* Copyright (C) 2000 Kevin L. Mitchell <klmitch@mit.edu>
#include "numnicks.h"
#include "s_conf.h"
#include "send.h"
-#include "support.h"
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
/*
* do_clearmode(struct Client *cptr, struct Client *sptr,
char control_buf[20];
int control_buf_i = 0;
struct ModeBuf mbuf;
- struct SLink *link, *next;
+ struct Ban *link, *next;
struct Membership *member;
/* Ok, so what are we supposed to get rid of? */
next = link->next;
modebuf_mode_string(&mbuf, MODE_DEL | MODE_BAN, /* delete ban */
- link->value.ban.banstr, 1);
-
- MyFree(link->value.ban.who); /* free up who string */
- free_link(link); /* and of course the link itself */
+ link->banstr, 1);
+ link->banstr = NULL; /* modebuf_mode_string() gave ownership of
+ * banstr to mbuf */
+ free_ban(link);
}
chptr->banlist = 0;