From 1cda046fed93adef23eee9e2c21abfdf7c863e34 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 31 Jan 2010 03:42:20 +0000 Subject: Allow connect classes to be specified without an allow or deny mask git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12336 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 8456703cc..c390e3471 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -621,10 +621,7 @@ void User::Oper(OperInfo* info) l->ChangeDisplayedHost(vhost.c_str()); std::string opClass = oper->getConfig("class"); if (!opClass.empty()) - { l->SetClass(opClass); - l->CheckClass(); - } } ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s (using oper '%s')", @@ -817,8 +814,10 @@ void LocalUser::FullConnect() return; } } + CheckClass(); + CheckLines(); - if (this->CheckLines()) + if (quitting) return; this->WriteServ("NOTICE Auth :Welcome to \002%s\002!",ServerInstance->Config->Network.c_str()); @@ -1606,10 +1605,14 @@ void LocalUser::SetClass(const std::string &explicit_name) { ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "ALLOW %s %d %s", c->host.c_str(), c->GetPort(), c->GetName().c_str()); } - else + else if (c->type == CC_DENY) { ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "DENY %s %d %s", c->GetHost().c_str(), c->GetPort(), c->GetName().c_str()); } + else + { + continue; + } /* check if host matches.. */ if (c->GetHost().length() && !InspIRCd::MatchCIDR(this->GetIPString(), c->GetHost(), NULL) && -- cgit v1.3.1-10-gc9f91