From e7e8447fa39ced57743eab51e8e2835ddddd7001 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 1 Aug 2021 19:23:48 +0100 Subject: Deduplicate code for checking if a user is securely connected. --- src/users.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/users.cpp b/src/users.cpp index 1f0af4f63..c5fbfdcdb 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -448,6 +448,11 @@ bool User::IsRecognized(bool check_secure) const return on_access; } +bool User::IsSecurelyConnected() const +{ + return HasMode("SSL") || HasExt("ssl"); +} + bool User::IsServicesOper() { if (!this->nc || !this->nc->IsServicesOper()) -- cgit