summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chanserv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/chanserv.c b/src/chanserv.c
index 36faedccb..24fa87ea5 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -1889,7 +1889,7 @@ int check_access(User * user, ChannelInfo * ci, int what)
if (level > 0)
ci->last_used = time(NULL);
- if (level == ACCESS_FOUNDER)
+ if (level >= ACCESS_FOUNDER)
return (what == CA_AUTODEOP || what == CA_NOJOIN) ? 0 : 1;
/* Hacks to make flags work */
if (what == CA_AUTODEOP && (ci->flags & CI_SECUREOPS) && level == 0)
@@ -2234,6 +2234,10 @@ int get_access(User * user, ChannelInfo * ci)
if (!ci || !user)
return -1;
+ // SuperAdmin always has highest level
+ if (user->isSuperAdmin)
+ return ACCESS_SUPERADMIN;
+
if (is_founder(user, ci))
return ACCESS_FOUNDER;