diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/cs_forbid.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/cs_forbid.c b/src/core/cs_forbid.c index c463551dd..d1ce0d119 100644 --- a/src/core/cs_forbid.c +++ b/src/core/cs_forbid.c @@ -29,6 +29,7 @@ class CommandCSForbid : public Command const char *reason = params.size() > 1 ? params[1].c_str() : NULL; Channel *c; + Entry *cur, *enext; if (ForceForbidReason && !reason) { @@ -75,6 +76,27 @@ class CommandCSForbid : public Command struct c_userlist *cu, *nextu; const char *av[3]; + /* Before banning everyone, it might be prudent to clear +e and +I lists.. + * to prevent ppl from rejoining.. ~ Viper */ + if (ircd->except && c->excepts && c->excepts->count) { + for (cur = c->excepts->entries; cur; cur = enext) { + enext = cur->next; + av[0] = "-e"; + av[1] = cur->mask; + ircdproto->SendMode(whosends(ci), chan, "-e %s", cur->mask); + chan_set_modes(whosends(ci)->nick, c, 2, av, 0); + } + } + if (ircd->invitemode && c->invites && c->invites->count) { + for (cur = c->invites->entries; cur; cur = enext) { + enext = cur->next; + av[0] = "-I"; + av[1] = cur->mask; + ircdproto->SendMode(whosends(ci), chan, "-I %s", cur->mask); + chan_set_modes(whosends(ci)->nick, c, 2, av, 0); + } + } + for (cu = c->users; cu; cu = nextu) { nextu = cu->next; |