if (chan->topicset != 0)
this->WriteLine(CommandFTopic::Builder(chan));
+ Utils->SendListLimits(chan, this);
SendListModes(chan);
for (Extensible::ExtensibleStore::const_iterator i = chan->GetExtList().begin(); i != chan->GetExtList().end(); i++)
#include "inspircd.h"
+#include "listmode.h"
#include "main.h"
#include "utils.h"
Sock->WriteLine(msg);
}
}
+
+void SpanningTreeUtilities::SendListLimits(Channel* chan, TreeSocket* sock)
+{
+ std::stringstream buffer;
+ const ModeParser::ListModeList& listmodes = ServerInstance->Modes->GetListModes();
+ for (ModeParser::ListModeList::const_iterator i = listmodes.begin(); i != listmodes.end(); ++i)
+ {
+ ListModeBase* lm = *i;
+ buffer << lm->GetModeChar() << " " << lm->GetLimit(chan) << " ";
+ }
+
+ std::string bufferstr = buffer.str();
+ if (bufferstr.empty())
+ return; // Should never happen.
+
+ bufferstr.erase(bufferstr.end() - 1);
+ if (sock)
+ sock->WriteLine(CommandMetadata::Builder(chan, "maxlist", bufferstr));
+ else
+ CommandMetadata::Builder(chan, "maxlist", bufferstr).Broadcast();
+}
/** Sends a PRIVMSG or a NOTICE to a channel obeying an exempt list and an optional prefix
*/
void SendChannelMessage(User* source, Channel* target, const std::string& text, char status, const ClientProtocol::TagMap& tags, const CUList& exempt_list, const char* message_type, TreeSocket* omit = NULL);
+
+ /** Send the channel list mode limits to either the specified server or all servers if NULL. */
+ void SendListLimits(Channel* chan, TreeSocket* sock = NULL);
};
inline void SpanningTreeUtilities::DoOneToMany(const CmdBuilder& params)