From 4a6e0e21338da87d54dd301a4a4075d61dc43b3f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 24 Nov 2021 20:29:29 +0000 Subject: Refactor the ClassTypes enum and move into ConnectClass. --- src/users.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 7d91de2b3..430d5df55 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -490,7 +490,7 @@ void LocalUser::CheckClass(bool clone_count) ServerInstance->Users.QuitUser(this, "Access denied by configuration"); return; } - else if (a->type == CC_DENY) + else if (a->type == ConnectClass::DENY) { ServerInstance->Users.QuitUser(this, a->config->getString("reason", "Unauthorised connection", 1)); return; @@ -1109,7 +1109,7 @@ void LocalUser::SetClass(const std::string &explicit_name) break; } - if (c->type == CC_NAMED) + if (c->type == ConnectClass::NAMED) { ServerInstance->Logs.Log("CONNECTCLASS", LOG_DEBUG, "The %s connect class is not suitable as neither nor are set", c->GetName().c_str()); @@ -1216,7 +1216,7 @@ const std::string& FakeUser::GetFullRealHost() return server->GetPublicName(); } -ConnectClass::ConnectClass(std::shared_ptr tag, char t, const std::vector& masks) +ConnectClass::ConnectClass(std::shared_ptr tag, Type t, const std::vector& masks) : config(tag) , hosts(masks) , name("unnamed") @@ -1228,7 +1228,7 @@ ConnectClass::ConnectClass(std::shared_ptr tag, char t, const std::ve { } -ConnectClass::ConnectClass(std::shared_ptr tag, char t, const std::vector& masks, std::shared_ptr parent) +ConnectClass::ConnectClass(std::shared_ptr tag, Type t, const std::vector& masks, std::shared_ptr parent) { Update(parent); name = "unnamed"; -- cgit v1.3.1-10-gc9f91