From 06790dc05dba3ff550d8b8be726f5ed47435b3c7 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 25 May 2007 18:41:12 +0000 Subject: Fix for bug #302. He may not have had any connect lines in his conf but it needed addressing anyway, because a bad rehash could leave the ircd in this state and it should just turn users away, not crash. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7138 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/users.cpp b/src/users.cpp index 8d0daf987..906a2e9c3 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -917,6 +917,13 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, * See my note down there for why this is required. DO NOT REMOVE. :) -- w00t */ ConnectClass* i = New->GetClass(); + + if (!i) + { + userrec::QuitUser(Instance, New, "Access denied by configuration"); + return; + } + New->CheckClass(); New->pingmax = i->GetPingTime(); -- cgit v1.2.3