summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/language.h1
-rw-r--r--include/services.h1
-rw-r--r--modules/core/cs_access.cpp7
-rw-r--r--modules/core/db_plain.cpp1
-rw-r--r--src/channels.cpp4
-rw-r--r--src/chanserv.cpp32
-rw-r--r--src/language.cpp4
7 files changed, 8 insertions, 42 deletions
diff --git a/include/language.h b/include/language.h
index 634b840dd..fd700d253 100644
--- a/include/language.h
+++ b/include/language.h
@@ -269,7 +269,6 @@ enum LanguageString
CHAN_LEVEL_AUTOVOICE,
CHAN_LEVEL_AUTOHALFOP,
CHAN_LEVEL_AUTOPROTECT,
- CHAN_LEVEL_AUTODEOP,
CHAN_LEVEL_NOJOIN,
CHAN_LEVEL_INVITE,
CHAN_LEVEL_AKICK,
diff --git a/include/services.h b/include/services.h
index 1ebdf608a..305b520ac 100644
--- a/include/services.h
+++ b/include/services.h
@@ -629,7 +629,6 @@ enum ChannelAccess
CA_SET, /* but not FOUNDER or PASSWORD */
CA_UNBAN,
CA_AUTOOP,
- CA_AUTODEOP, /* Maximum, not minimum */
CA_AUTOVOICE,
CA_OPDEOP, /* ChanServ commands OP and DEOP */
CA_ACCESS_LIST,
diff --git a/modules/core/cs_access.cpp b/modules/core/cs_access.cpp
index 3ca0e59f6..77f63ac09 100644
--- a/modules/core/cs_access.cpp
+++ b/modules/core/cs_access.cpp
@@ -270,7 +270,7 @@ class CommandCSAccess : public Command
if (i == end)
u->SendMessage(ChanServ, CHAN_ACCESS_NOT_FOUND, nick.c_str(), ci->name.c_str());
- else if (nc != u->Account() && check_access(u, ci, CA_NOJOIN) && check_access(u, ci, CA_AUTODEOP) && get_access(u, ci) <= access->level && !u->Account()->HasPriv("chanserv/access/modify"))
+ else if (nc != u->Account() && check_access(u, ci, CA_NOJOIN) && get_access(u, ci) <= access->level && !u->Account()->HasPriv("chanserv/access/modify"))
u->SendMessage(ChanServ, ACCESS_DENIED);
else
{
@@ -556,10 +556,7 @@ class CommandCSLevels : public Command
{
j = levelinfo[i].what;
- if (j == CA_AUTOOP || j == CA_AUTODEOP || j == CA_AUTOVOICE || j == CA_NOJOIN)
- u->SendMessage(ChanServ, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
- else
- u->SendMessage(ChanServ, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
+ u->SendMessage(ChanServ, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
}
else if (j == ACCESS_FOUNDER)
u->SendMessage(ChanServ, CHAN_LEVELS_LIST_FOUNDER, levelinfo_maxwidth, levelinfo[i].name.c_str());
diff --git a/modules/core/db_plain.cpp b/modules/core/db_plain.cpp
index 78db1aba7..3fa235710 100644
--- a/modules/core/db_plain.cpp
+++ b/modules/core/db_plain.cpp
@@ -254,7 +254,6 @@ ChannelLevel ChannelLevels[] = {
{"SET", CA_SET},
{"UNBAN", CA_UNBAN},
{"AUTOOP", CA_AUTOOP},
- {"AUTODEOP", CA_AUTODEOP},
{"AUTOVOICE", CA_AUTOVOICE},
{"OPDEOP", CA_OPDEOP},
{"ACCESS_LIST", CA_ACCESS_LIST},
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"),