summaryrefslogtreecommitdiff
path: root/src/modules/m_sajoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_sajoin.cpp')
-rw-r--r--src/modules/m_sajoin.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 2fe790b6f..dee6746cd 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -57,6 +57,15 @@ class cmd_sajoin : public command_t
ServerInstance->WriteOpers(std::string(user->nick)+" used SAJOIN to make "+std::string(dest->nick)+" join "+parameters[1]);
chanrec::JoinUser(ServerInstance, dest, parameters[1], true);
+
+ /* Fix for dotslasher and w00t - if the join didnt succeed, return CMD_FAILURE so that it doesnt propogate */
+ chanrec* n = ServerInstance->FindChan(parameters[1]);
+ if (n)
+ {
+ return (n->HasUser(dest) ? CMD_SUCCESS : CMD_FAILURE);
+ }
+ else
+ return CMD_FAILURE;
}
return CMD_SUCCESS;