summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-02-17 21:33:51 -0500
committerAdam <Adam@anope.org>2011-02-18 11:48:29 -0500
commit470f8af97c135e69468402070facfa680d62d623 (patch)
treede4caecd91ca4445f5469b49cf702c722efc0226
parenta1296a3b7c327f6f969b859488006cb69fb68801 (diff)
Fixed some logic fail when determining when a recognized user gets access
-rw-r--r--src/regchannel.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index b1d7c77dc..2a5f09c45 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -227,20 +227,20 @@ ChanAccess *ChannelInfo::GetAccess(User *u, int16 level)
if (level && level != access->level)
continue;
/* Access entry is a mask and we match it */
- if (!access->nc && (Anope::Match(u->nick, access->mask) || Anope::Match(u->GetDisplayedMask(), access->mask)))
+ else if (!access->nc && (Anope::Match(u->nick, access->mask) || Anope::Match(u->GetDisplayedMask(), access->mask)))
;
/* Access entry is a nick core and we are identified for that account */
else if (access->nc && u->IsIdentified() && u->Account() == access->nc)
;
- /* User is not identified but on a registered nick, and is recognized, and is on an insecure channel */
- else if (na && u->IsRecognized() && !this->HasFlag(CI_SECURE))
- ;
else
continue;
- /* Use the highest level access available */
- if (!highest || access->level > highest->level)
- highest = access;
+ if (u->IsIdentified() || (na && u->IsRecognized() && !this->HasFlag(CI_SECURE)))
+ {
+ /* Use the highest level access available */
+ if (!highest || access->level > highest->level)
+ highest = access;
+ }
}
return highest;