]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/protocolinterface.cpp
m_spanningtree: Ensure tags are sent in forwarded cmds
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / protocolinterface.cpp
index 192f7cff2ca2e5abae2ddee5d384b1a2e7038ff3..56b9370ad9692da44a6777fe3995e7cbe622a7af 100644 (file)
@@ -38,13 +38,13 @@ void SpanningTreeProtocolInterface::GetServerList(ServerList& sl)
                ps.parentname = s ? s->GetName() : "";
                ps.usercount = i->second->UserCount;
                ps.opercount = i->second->OperCount;
-               ps.gecos = i->second->GetDesc();
+               ps.description = i->second->GetDesc();
                ps.latencyms = i->second->rtt;
                sl.push_back(ps);
        }
 }
 
-bool SpanningTreeProtocolInterface::SendEncapsulatedData(const std::string& targetmask, const std::string& cmd, const parameterlist& params, User* source)
+bool SpanningTreeProtocolInterface::SendEncapsulatedData(const std::string& targetmask, const std::string& cmd, const CommandBase::Params& params, User* source)
 {
        if (!source)
                source = ServerInstance->FakeClient;
@@ -71,7 +71,7 @@ bool SpanningTreeProtocolInterface::SendEncapsulatedData(const std::string& targ
        return true;
 }
 
-void SpanningTreeProtocolInterface::BroadcastEncap(const std::string& cmd, const parameterlist& params, User* source, User* omit)
+void SpanningTreeProtocolInterface::BroadcastEncap(const std::string& cmd, const CommandBase::Params& params, User* source, User* omit)
 {
        if (!source)
                source = ServerInstance->FakeClient;
@@ -102,48 +102,17 @@ void SpanningTreeProtocolInterface::Server::SendMetaData(const std::string& key,
        sock->WriteLine(CommandMetadata::Builder(key, data));
 }
 
-void SpanningTreeProtocolInterface::SendTopic(Channel* channel, std::string &topic)
-{
-       CommandFTopic::Builder(ServerInstance->FakeClient, channel).Broadcast();
-}
-
-void SpanningTreeProtocolInterface::SendMode(User* source, User* u, Channel* c, const std::vector<std::string>& modedata, const std::vector<TranslateType>& translate)
-{
-       if (u)
-       {
-               if (u->registered != REG_ALL)
-                       return;
-
-               CmdBuilder params(source, "MODE");
-               params.push_back(u->uuid);
-               params.insert(modedata);
-               params.Broadcast();
-       }
-       else
-       {
-               CmdBuilder params(source, "FMODE");
-               params.push_back(c->name);
-               params.push_back(ConvToStr(c->age));
-               params.push_back(CommandParser::TranslateUIDs(translate, modedata));
-               params.Broadcast();
-       }
-}
-
 void SpanningTreeProtocolInterface::SendSNONotice(char snomask, const std::string &text)
 {
        CmdBuilder("SNONOTICE").push(snomask).push_last(text).Broadcast();
 }
 
-void SpanningTreeProtocolInterface::PushToClient(User* target, const std::string &rawline)
-{
-       CmdBuilder("PUSH").push(target->uuid).push_last(rawline).Unicast(target);
-}
-
 void SpanningTreeProtocolInterface::SendMessage(Channel* target, char status, const std::string& text, MessageType msgtype)
 {
        const char* cmd = (msgtype == MSG_PRIVMSG ? "PRIVMSG" : "NOTICE");
        CUList exempt_list;
-       Utils->SendChannelMessage(ServerInstance->Config->GetSID(), target, text, status, exempt_list, cmd);
+       ClientProtocol::TagMap tags;
+       Utils->SendChannelMessage(ServerInstance->Config->GetSID(), target, text, status, tags, exempt_list, cmd);
 }
 
 void SpanningTreeProtocolInterface::SendMessage(User* target, const std::string& text, MessageType msgtype)