1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 22:36:39 +02:00

Added os_forbid

This commit is contained in:
Adam
2011-05-06 18:02:53 -04:00
parent b59602abf8
commit fd4b52ec38
66 changed files with 586 additions and 702 deletions
+1 -14
View File
@@ -19,7 +19,6 @@ class CommandCSDrop : public Command
public:
CommandCSDrop() : Command("DROP", 1, 1)
{
this->SetFlag(CFLAG_ALLOW_FORBIDDEN);
this->SetFlag(CFLAG_ALLOW_SUSPENDED);
this->SetDesc(_("Cancel the registration of a channel"));
}
@@ -39,15 +38,9 @@ class CommandCSDrop : public Command
ci = cs_findchan(chan);
if (ci->HasFlag(CI_FORBIDDEN) && !u->HasCommand("chanserv/drop"))
{
source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str());
return MOD_CONT;
}
if (ci->HasFlag(CI_SUSPENDED) && !u->HasCommand("chanserv/drop"))
{
source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str());
source.Reply(_(CHAN_X_SUSPENDED), chan.c_str());
return MOD_CONT;
}
@@ -60,12 +53,6 @@ class CommandCSDrop : public Command
if (ci->c && ModeManager::FindChannelModeByName(CMODE_REGISTERED))
ci->c->RemoveMode(NULL, CMODE_REGISTERED, "", false);
if (ircd->chansqline && ci->HasFlag(CI_FORBIDDEN))
{
XLine x(ci->name);
ircdproto->SendSQLineDel(&x);
}
bool override = (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER));
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "founder: " << (ci->founder ? ci->founder->display : "none");