diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-22 13:38:06 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-22 13:38:06 +0000 |
commit | fd97ca43bbe87959e58f3f47bcb338b7b3a4f3f5 (patch) | |
tree | 5e666e6d54e2febf53fd5539b823597d02709549 | |
parent | 82ebe116132fb9b64005f8fafc8b5ed34ed8d8eb (diff) |
Fix sending bans on sync:
* Dont cram them after +jfJLlk parameters
* Limit them to MAXMODES per line
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5514 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 155ad7099..9c41abee1 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1914,9 +1914,19 @@ class TreeSocket : public InspSocket for (BanList::iterator b = c->bans.begin(); b != c->bans.end(); b++) { modes.append("b"); - params.append(b->data).append(" "); + params.append(" ").append(b->data); + if (params.length() >= MAXMODES) + { + /* Wrap at MAXMODES */ + this->WriteLine(std::string(":")+this->Instance->Config->ServerName+" FMODE "+c->name+" "+ConvToStr(c->age)+" +"+modes+params); + modes = ""; + params = ""; + } } - this->WriteLine(std::string(":")+this->Instance->Config->ServerName+" FMODE "+c->name+" "+ConvToStr(c->age)+" +"+c->ChanModes(true)+modes+" "+params); + this->WriteLine(std::string(":")+this->Instance->Config->ServerName+" FMODE "+c->name+" "+ConvToStr(c->age)+" +"+c->ChanModes(true)); + /* Only send these if there are any */ + if (!modes.empty()) + this->WriteLine(std::string(":")+this->Instance->Config->ServerName+" FMODE "+c->name+" "+ConvToStr(c->age)+" +"+modes+params); } /** Send G, Q, Z and E lines */ |