From 2e2f1e98a6123aa1177623f92480ce7ba3c55acb Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 15 Sep 2006 17:17:30 +0000 Subject: 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 --- src/modules/m_sajoin.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') 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; -- cgit v1.2.3