diff options
Diffstat (limited to 'src/modules/cs_enforce.c')
-rw-r--r-- | src/modules/cs_enforce.c | 8 |
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; |