summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-25 18:41:12 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-25 18:41:12 +0000
commit06790dc05dba3ff550d8b8be726f5ed47435b3c7 (patch)
treeccc08faa5513bd3b6477c56b980d4206f1cd3af9 /src
parentc5a1b9632715de9eeb8fbee7add4c5c3fce79d4d (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp7
1 files changed, 7 insertions, 0 deletions
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();