From bff68688367b82f9841d6c45114c58af61a800e8 Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 24 Apr 2009 15:56:31 +0000 Subject: Fix crash from unregistered users joining a channel, discovered by Namegduf git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11328 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/channels.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/channels.cpp b/src/channels.cpp index c1a5a59a3..c8334d42e 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -243,7 +243,8 @@ void Channel::SetDefaultModes() */ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool override, const char* key, bool bursting, time_t TS) { - if (!user || !cn) + // Fix: unregistered users could be joined using /SAJOIN + if (!user || !cn || user->registered != REG_ALL) return NULL; char cname[MAXBUF]; -- cgit v1.2.3