mirror of
https://github.com/anope/anope.git
synced 2026-07-06 21:03:13 +02:00
Complete rewrite of everything associated with modes, this breaks saving and reading mlocked modes from the databases until the new databases are implemented
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2560 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -47,9 +47,7 @@ class CommandCSEnforce : public Command
|
||||
|
||||
void DoModes(Channel *c)
|
||||
{
|
||||
CBMode *cbm;
|
||||
|
||||
if ((cbm = &cbmodes[static_cast<int>('R')])->flag && (c->mode & cbm->flag))
|
||||
if (c->HasMode(CMODE_REGISTEREDONLY))
|
||||
this->DoCModeR(c);
|
||||
}
|
||||
|
||||
@@ -140,7 +138,6 @@ class CommandCSEnforce : public Command
|
||||
const char *reason;
|
||||
const char *av[3];
|
||||
User *u;
|
||||
CBMode *cbm;
|
||||
|
||||
if (!(ci = c->ci))
|
||||
return;
|
||||
@@ -159,7 +156,7 @@ class CommandCSEnforce : public Command
|
||||
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))
|
||||
if (!c->HasMode(CMODE_REGISTERED))
|
||||
{
|
||||
ircdproto->SendMode(whosends(ci), ci->name, "+b %s %lu", mask, time(NULL));
|
||||
chan_set_modes(s_ChanServ, c, 2, av, 1);
|
||||
@@ -234,7 +231,7 @@ class CommandCSEnforce : public Command
|
||||
ircdproto->SendMessage(findbot(s_ChanServ), u->nick, " ");
|
||||
me->NoticeLang(s_ChanServ, u, LNG_CHAN_HELP_ENFORCE);
|
||||
ircdproto->SendMessage(findbot(s_ChanServ), u->nick, " ");
|
||||
if (cbmodes[static_cast<int>('R')].flag)
|
||||
if (ModeManager::FindChannelModeByName(CMODE_REGISTERED))
|
||||
me->NoticeLang(s_ChanServ, u, LNG_CHAN_HELP_ENFORCE_R_ENABLED);
|
||||
else
|
||||
me->NoticeLang(s_ChanServ, u, LNG_CHAN_HELP_ENFORCE_R_DISABLED);
|
||||
|
||||
@@ -214,9 +214,9 @@ int canBanUser(Channel * c, User * u, User * u2)
|
||||
int ok = 0;
|
||||
if (!check_access(u, ci, CA_BAN))
|
||||
notice_lang(s_ChanServ, u, ACCESS_DENIED);
|
||||
else if (ircd->except && is_excepted(ci, u2))
|
||||
else if (is_excepted(ci, u2))
|
||||
notice_lang(s_ChanServ, u, CHAN_EXCEPTED, u2->nick, ci->name);
|
||||
else if (ircd->protectedumode && is_protected(u2))
|
||||
else if (is_protected(u2))
|
||||
notice_lang(s_ChanServ, u, ACCESS_DENIED);
|
||||
else
|
||||
ok = 1;
|
||||
|
||||
Reference in New Issue
Block a user