summaryrefslogtreecommitdiff
path: root/src/chanserv.c
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-28 00:49:37 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-28 00:49:37 +0000
commitbd7f4f8c4995ddc81d5c5ab9cb32ed05048908c2 (patch)
tree3638f54db859023ca2a9cfbf8983b7b07527005e /src/chanserv.c
parent090107db5f2afa16e155f56d7928e38d0a17a295 (diff)
Patch from Adam, reducing duplication in cs_modes. Untested.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2135 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/chanserv.c')
-rw-r--r--src/chanserv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/chanserv.c b/src/chanserv.c
index b8442051a..0c950d1ee 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -111,8 +111,11 @@ CSModeUtil csmodeutils[] = {
{ "VOICE", "voice", "+v", 0, CA_VOICE, CA_VOICEME },
{ "DEHALFOP", "dehalfop", "-h", 0, CA_HALFOP, CA_HALFOPME },
{ "HALFOP", "halfop", "+h", 0, CA_HALFOP, CA_HALFOPME },
+ /* These get set later */
{ "DEPROTECT", "", "", 0, CA_PROTECT, CA_PROTECTME },
{ "PROTECT", "", "", 0, CA_PROTECT, CA_PROTECTME },
+ { "DEOWNER", "", "", 0, ACCESS_FOUNDER, ACCESS_FOUNDER},
+ { "OWNER", "", "", 0, ACCESS_FOUNDER, ACCESS_FOUNDER},
{ NULL }
};
@@ -1576,6 +1579,8 @@ int check_access(User * user, ChannelInfo * ci, int what)
if (level > 0)
ci->last_used = time(NULL);
+ if (what == ACCESS_FOUNDER)
+ return is_founder(user, ci);
if (level >= ACCESS_FOUNDER)
return (what == CA_AUTODEOP || what == CA_NOJOIN) ? 0 : 1;
/* Hacks to make flags work */