diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-04-03 19:10:18 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-04-08 23:13:24 +0200 |
commit | ebe5b201aab71cf2ead1e068889be736314fbb73 (patch) | |
tree | 33bc1cc227073304f5e25731fa35a60cfd2712a3 /src/modules/m_spanningtree/netburst.cpp | |
parent | 0ce252f05ced1a0dddfc9c353d68007a3faba239 (diff) |
Migrate u_listmode.h into the core, change +b to use it
Diffstat (limited to 'src/modules/m_spanningtree/netburst.cpp')
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 2f43c92a1..978886be6 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -21,6 +21,7 @@ #include "inspircd.h" #include "xline.h" +#include "listmode.h" #include "treesocket.h" #include "treeserver.h" @@ -140,32 +141,8 @@ void TreeSocket::SendFJoins(Channel* c) buffer.append(list).append("\r\n"); } - int linesize = 1; - for (BanList::iterator b = c->bans.begin(); b != c->bans.end(); b++) - { - int size = b->data.length() + 2; - int currsize = linesize + size; - if (currsize <= 350) - { - modes.append("b"); - params.append(" ").append(b->data); - linesize += size; - } - if ((modes.length() >= ServerInstance->Config->Limits.MaxModes) || (currsize > 350)) - { - /* Wrap at MAXMODES */ - buffer.append(":").append(ServerInstance->Config->GetSID()).append(" FMODE ").append(c->name).append(" ").append(ConvToStr(c->age)).append(" +").append(modes).append(params).append("\r\n"); - modes.clear(); - params.clear(); - linesize = 1; - } - } - - /* Only send these if there are any */ - if (!modes.empty()) - buffer.append(":").append(ServerInstance->Config->GetSID()).append(" FMODE ").append(c->name).append(" ").append(ConvToStr(c->age)).append(" +").append(modes).append(params); - - this->WriteLine(buffer); + ModeReference ban(NULL, "ban"); + static_cast<ListModeBase*>(*ban)->DoSyncChannel(c, Utils->Creator, this); } /** Send all XLines we know about */ |