1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 15:53:13 +02:00

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
This commit is contained in:
cyberbotx
2009-03-14 01:17:55 +00:00
parent 8974008304
commit 40005c5029
+8
View File
@@ -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;