diff options
-rw-r--r-- | include/users.h | 4 | ||||
-rw-r--r-- | src/regchannel.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 14 |
3 files changed, 8 insertions, 12 deletions
diff --git a/include/users.h b/include/users.h index 5bcd61f95..4248ce744 100644 --- a/include/users.h +++ b/include/users.h @@ -221,10 +221,10 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe bool IsIdentified(bool check_nick = false) const; /** Check if the user is recognized for their nick (on the nicks access list) - * @param check_nick Only returns true if the user has secure off + * @param check_secure Only returns true if the user has secure off * @return true or false */ - bool IsRecognized(bool check_nick = true) const; + bool IsRecognized(bool check_secure = true) const; /** Check if the user is a services oper * @return true if they are an oper diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 9148d99fd..89dd14e06 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -602,7 +602,7 @@ AccessGroup ChannelInfo::AccessFor(const User *u) return group; const NickCore *nc = u->Account(); - if (nc == NULL && u->IsRecognized()) + if (nc == NULL && !this->HasExt("SECURE") && u->IsRecognized()) { const NickAlias *na = NickAlias::Find(u->nick); if (na != NULL) diff --git a/src/users.cpp b/src/users.cpp index 1355911bf..691653055 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -456,24 +456,20 @@ NickCore *User::Account() const return this->nc; } -bool User::IsIdentified(bool CheckNick) const +bool User::IsIdentified(bool check_nick) const { - if (CheckNick && this->nc) + if (check_nick && this->nc) { NickAlias *na = NickAlias::Find(this->nc->display); - - if (na && *na->nc == *this->nc) - return true; - - return false; + return na && *na->nc == *this->nc; } return this->nc ? true : false; } -bool User::IsRecognized(bool CheckSecure) const +bool User::IsRecognized(bool check_secure) const { - if (CheckSecure && on_access) + if (check_secure && on_access) { const NickAlias *na = NickAlias::Find(this->nick); |