summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-01 16:48:52 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-01 16:48:52 +0000
commit29dc6c70d7854ef31b26ea8e962bec23f84c1475 (patch)
treed6f61802eb25766d1aa2d83e32b49e13d5571b4e /src/modules
parent1fe8085c6dbecc9558e61ea1829dbf3fcb41830e (diff)
Special check in here now that forbids all use of MODE in s2s for changing channel modes, closing a loophole that services devs keep using to bypass implenting proper TS, and breaking our protocol.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9244 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 6bdeaa617..793982ec7 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -532,6 +532,16 @@ bool TreeSocket::ProcessLine(std::string &line)
const char* modelist[MAXPARAMETERS];
for (size_t i = 0; i < params.size(); i++)
modelist[i] = params[i].c_str();
+
+ /* We don't support this for channel mode changes any more! */
+ if (params.size() >= 1)
+ {
+ if (Instance->FindChan(params[1]))
+ {
+ this->SendError("Protocol violation by '"+prefix+"'! MODE for channel mode changes is not supported by the InspIRCd 1.2 protocol. You must use FMODE to preserve channel timestamps.");
+ return false;
+ }
+ }
// Insert into the parser
this->Instance->SendMode(modelist, params.size(), this->Instance->FakeClient);