diff options
author | Adam <Adam@anope.org> | 2011-04-18 21:07:54 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-04-18 21:07:54 -0400 |
commit | ca169489b252440213f68cd0901e8ffc8606960e (patch) | |
tree | 96694d0872120be6dcf9cc562b9cbff34daa740c /src | |
parent | 713c2eb704919f03f24e58e2399c3fcf72830602 (diff) |
Allow unidentified users to still get access by non nickcore access entries
Diffstat (limited to 'src')
-rw-r--r-- | src/regchannel.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 7ced380e5..b1e7ccdbd 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -215,10 +215,6 @@ ChanAccess *ChannelInfo::GetAccess(User *u, int16 level) if (this->access.empty()) return NULL; - NickAlias *na = NULL; - if (!u->IsIdentified()) - na = findnick(u->nick); - ChanAccess *highest = NULL; for (unsigned i = 0, end = this->access.size(); i < end; ++i) { @@ -230,17 +226,14 @@ ChanAccess *ChannelInfo::GetAccess(User *u, int16 level) else if (!taccess->nc && (Anope::Match(u->nick, taccess->mask) || Anope::Match(u->GetDisplayedMask(), taccess->mask))) ; /* Access entry is a nick core and we are identified for that account */ - else if (taccess->nc && u->IsIdentified() && u->Account() == taccess->nc) + else if (taccess->nc && (u->IsIdentified() || (u->IsRecognized() && !this->HasFlag(CI_SECURE))) && u->Account() == taccess->nc) ; else continue; - if (u->IsIdentified() || (na && u->IsRecognized() && !this->HasFlag(CI_SECURE))) - { - /* Use the highest level access available */ - if (!highest || taccess->level > highest->level) - highest = taccess; - } + /* Use the highest level access available */ + if (!highest || taccess->level > highest->level) + highest = taccess; } return highest; |