summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-04-24 15:56:31 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-04-24 15:56:31 +0000
commitbff68688367b82f9841d6c45114c58af61a800e8 (patch)
tree4f4560a01dfa7f92f15b4bb4a69b2aae17ab9698 /src
parent15b51c2ecc81e06c0efb537bec968f7c5acd2ed4 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp3
1 files changed, 2 insertions, 1 deletions
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];