summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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];