diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-15 17:17:30 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-15 17:17:30 +0000 |
commit | 2e2f1e98a6123aa1177623f92480ce7ba3c55acb (patch) | |
tree | b3b3e7c6c8d28ea6f306547aeadbf5358a8866af | |
parent | 946bff6371d73b50dae6f7011ba0adff852302f0 (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
-rw-r--r-- | include/channels.h | 8 | ||||
-rw-r--r-- | src/modules/m_sajoin.cpp | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/include/channels.h b/include/channels.h index 76d4aeb50..6c92f0801 100644 --- a/include/channels.h +++ b/include/channels.h @@ -70,14 +70,6 @@ class BanItem : public HostItem */ typedef std::vector<BanItem> BanList; -/** Holds a complete exempt list - */ -typedef std::vector<ExemptItem> ExemptList; - -/** Holds a complete invite list - */ -typedef std::vector<InviteItem> InviteList; - /** A list of users on a channel */ typedef std::map<userrec*,userrec*> CUList; 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; |