summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-15 17:17:30 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-15 17:17:30 +0000
commit2e2f1e98a6123aa1177623f92480ce7ba3c55acb (patch)
treeb3b3e7c6c8d28ea6f306547aeadbf5358a8866af /src/modules
parent946bff6371d73b50dae6f7011ba0adff852302f0 (diff)
Fix for bug noticed by dotslasher (?) where SAJOIN can desync
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5258 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-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;