From 40005c5029b35633e962c4cb2db9d52d36e8d99a Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Sat, 14 Mar 2009 01:17:55 +0000 Subject: [PATCH] Fix bug #1035, patch by Adam, now bans set through CS ENFORCE can be removed through CS UNBAN or CS CLEAR BANS. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2157 5417fbe8-f217-4b02-8779-1006273d7864 --- src/modules/cs_enforce.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/cs_enforce.c b/src/modules/cs_enforce.c index cdb610ecd..7e8a1ae25 100644 --- a/src/modules/cs_enforce.c +++ b/src/modules/cs_enforce.c @@ -115,9 +115,12 @@ class CommandCSEnforce : public Command u = user->user; if (check_access(u, c->ci, CA_NOJOIN)) { + av[0] = "+b"; get_idealban(ci, u, mask, sizeof(mask)); + av[1] = mask; reason = getstring(u, CHAN_NOT_ALLOWED_TO_JOIN); ircdproto->SendMode(whosends(ci), ci->name, "+b %s %lu", mask, time(NULL)); + chan_set_modes(s_ChanServ, c, 2, av, 1); ircdproto->SendKick(whosends(ci), ci->name, u->nick, "%s", reason); av[0] = ci->name; av[1] = u->nick; @@ -154,10 +157,15 @@ class CommandCSEnforce : public Command u = user->user; if (!nick_identified(u)) { + av[0] = "+b"; get_idealban(ci, u, mask, sizeof(mask)); + av[1] = mask; reason = getstring(u, CHAN_NOT_ALLOWED_TO_JOIN); if (!(cbm = &cbmodes[static_cast('R')])->flag || !(c->mode & cbm->flag)) + { ircdproto->SendMode(whosends(ci), ci->name, "+b %s %lu", mask, time(NULL)); + chan_set_modes(s_ChanServ, c, 2, av, 1); + } ircdproto->SendKick(whosends(ci), ci->name, u->nick, "%s", reason); av[0] = ci->name; av[1] = u->nick;