diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-25 04:52:49 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-25 04:52:49 +0000 |
commit | e2c6825cd233a4271f7bdb79c2f294ad7c4566b9 (patch) | |
tree | 911308889941bb32e1151910ebf95947c8bb6000 /src/core/cs_set.c | |
parent | fdcc5b5ee1f25a0abdc3925332c3f920578e0591 (diff) |
Cleaned up a lot of the channel access reordering code, properly change users with less than voice access on channels to XOP, and fix a potential crashbug after switching to XOP on IRCds that do not support halfop
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2667 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/cs_set.c')
-rw-r--r-- | src/core/cs_set.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/cs_set.c b/src/core/cs_set.c index 63d99b34e..0ba6430cd 100644 --- a/src/core/cs_set.c +++ b/src/core/cs_set.c @@ -765,17 +765,16 @@ int do_set_xop(User * u, ChannelInfo * ci, char *param) } else if (CHECKLEV(CA_AUTOOP) || CHECKLEV(CA_OPDEOP) || CHECKLEV(CA_OPDEOPME)) { access->level = ACCESS_AOP; - } else if (ircd->halfop) { - if (CHECKLEV(CA_AUTOHALFOP) || CHECKLEV(CA_HALFOP) - || CHECKLEV(CA_HALFOPME)) { + } else if (ircd->halfop && (CHECKLEV(CA_AUTOHALFOP) || CHECKLEV(CA_HALFOP) + || CHECKLEV(CA_HALFOPME))) { access->level = ACCESS_HOP; - } } else if (CHECKLEV(CA_AUTOVOICE) || CHECKLEV(CA_VOICE) || CHECKLEV(CA_VOICEME)) { access->level = ACCESS_VOP; } else { access->in_use = 0; access->nc = NULL; + CleanAccess(ci); } } |