summaryrefslogtreecommitdiff
path: root/src/modules/cs_enforce.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-14 01:17:55 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-14 01:17:55 +0000
commit40005c5029b35633e962c4cb2db9d52d36e8d99a (patch)
treead590eda7108827f73bd71443e07532d01279ce3 /src/modules/cs_enforce.c
parent8974008304b7a5b0fd864e9c99a2d4fd2d19433a (diff)
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
Diffstat (limited to 'src/modules/cs_enforce.c')
-rw-r--r--src/modules/cs_enforce.c8
1 files changed, 8 insertions, 0 deletions
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<int>('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;