summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-11-21 16:56:18 -0500
committerAdam <Adam@anope.org>2010-12-12 19:35:30 -0500
commitc5eb349d41ecbc9c961ff2537d9f8985156ab476 (patch)
treeee4e35d302a77a980134d84934f77b57e69b0348 /src
parent7790a7f98c56a16e6fed2bf51168881902880c62 (diff)
Removed the AUTODEOP level, it is unnecessary now because of cs_mode
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp4
-rw-r--r--src/chanserv.cpp32
-rw-r--r--src/language.cpp4
3 files changed, 6 insertions, 34 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 27d804c18..e303840e5 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -1183,8 +1183,8 @@ void chan_set_correct_modes(User *user, Channel *c, int give_modes)
else if (voice && check_access(user, ci, CA_AUTOVOICE))
c->SetMode(NULL, CMODE_VOICE, user->nick);
}
- /* If this channel has secureops or the user matches autodeop or the channel is syncing and they are not ulined, check to remove modes */
- if ((ci->HasFlag(CI_SECUREOPS) || check_access(user, ci, CA_AUTODEOP) || c->HasFlag(CH_SYNCING)) && !user->server->IsULined())
+ /* If this channel has secureops or the channel is syncing and they are not ulined, check to remove modes */
+ if ((ci->HasFlag(CI_SECUREOPS) || c->HasFlag(CH_SYNCING)) && !user->server->IsULined())
{
if (owner && c->HasUserStatus(user, CMODE_OWNER) && !check_access(user, ci, CA_FOUNDER))
c->RemoveMode(NULL, CMODE_OWNER, user->nick);
diff --git a/src/chanserv.cpp b/src/chanserv.cpp
index ef3de90cd..c5e11e633 100644
--- a/src/chanserv.cpp
+++ b/src/chanserv.cpp
@@ -19,7 +19,6 @@ registered_channel_map RegisteredChannelList;
static int def_levels[][2] = {
{ CA_AUTOOP, 5 },
{ CA_AUTOVOICE, 3 },
- { CA_AUTODEOP, -1 },
{ CA_NOJOIN, -2 },
{ CA_INVITE, 5 },
{ CA_AKICK, 10 },
@@ -61,7 +60,6 @@ static int def_levels[][2] = {
};
LevelInfo levelinfo[] = {
- { CA_AUTODEOP, "AUTODEOP", CHAN_LEVEL_AUTODEOP },
{ CA_AUTOHALFOP, "AUTOHALFOP", CHAN_LEVEL_AUTOHALFOP },
{ CA_AUTOOP, "AUTOOP", CHAN_LEVEL_AUTOOP },
{ CA_AUTOPROTECT, "AUTOPROTECT", CHAN_LEVEL_AUTOPROTECT },
@@ -310,12 +308,6 @@ int check_valid_admin(User *user, Channel *chan, int servermode)
return 0;
}
- if (check_access(user, chan->ci, CA_AUTODEOP))
- {
- chan->RemoveMode(NULL, CMODE_PROTECT, user->nick);
- return 0;
- }
-
return 1;
}
@@ -354,20 +346,6 @@ int check_valid_op(User *user, Channel *chan, int servermode)
return 0;
}
- if (check_access(user, chan->ci, CA_AUTODEOP))
- {
- chan->RemoveMode(NULL, CMODE_OP, user->nick);
-
- if (owner)
- chan->RemoveMode(NULL, CMODE_OWNER, user->nick);
- if (protect)
- chan->RemoveMode(NULL, CMODE_PROTECT, user->nick);
- if (halfop)
- chan->RemoveMode(NULL, CMODE_HALFOP, user->nick);
-
- return 0;
- }
-
return 1;
}
@@ -508,19 +486,15 @@ int check_access(User *user, ChannelInfo *ci, int what)
/* Superadmin always wins. Always. */
if (user->isSuperAdmin)
- return what == CA_AUTODEOP || what == CA_NOJOIN ? 0 : 1;
+ return what == CA_NOJOIN ? 0 : 1;
/* If the access of the level we are checking is disabled, they *always* get denied */
if (limit == ACCESS_INVALID)
return 0;
/* If the level of the user is >= the level for "founder" of this channel and "founder" isn't disabled, they can do anything */
if (ci->levels[CA_FOUNDER] != ACCESS_INVALID && level >= ci->levels[CA_FOUNDER])
- return what == CA_AUTODEOP || what == CA_NOJOIN ? 0 : 1;
-
- /* Hacks to make flags work */
- if (what == CA_AUTODEOP && ci->HasFlag(CI_SECUREOPS) && !level)
- return 1;
+ return what == CA_NOJOIN ? 0 : 1;
- if (what == CA_AUTODEOP || what == CA_NOJOIN)
+ if (what == CA_NOJOIN)
return level <= ci->levels[what];
else
return level >= ci->levels[what];
diff --git a/src/language.cpp b/src/language.cpp
index 31eb1f1f8..5a94601eb 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -707,8 +707,6 @@ const char *const language_strings[LANG_STRING_COUNT] = {
_("Automatic mode +h"),
/* CHAN_LEVEL_AUTOPROTECT */
_("Automatic mode +a"),
- /* CHAN_LEVEL_AUTODEOP */
- _("Channel operator status disallowed"),
/* CHAN_LEVEL_NOJOIN */
_("Not allowed to join channel"),
/* CHAN_LEVEL_INVITE */
@@ -3929,7 +3927,7 @@ const char *const language_strings[LANG_STRING_COUNT] = {
"set, see HELP LEVELS DESC."),
/* CHAN_HELP_LEVELS_DESC */
_("The following feature/function names are understood. Note\n"
- "that the levels for AUTODEOP and NOJOIN are maximum levels,\n"
+ "that the leves for NOJOIN is the maximum level,\n"
"while all others are minimum levels."),
/* CHAN_HELP_LEVELS_DESC_FORMAT */
_(" %-*s %s"),