summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree.cpp14
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 */