From 29dc6c70d7854ef31b26ea8e962bec23f84c1475 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 1 Apr 2008 16:48:52 +0000 Subject: 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 --- src/modules/m_spanningtree/treesocket2.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/modules/m_spanningtree') 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); -- cgit v1.2.3