X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fprotocolinterface.cpp;h=aaf946333fcb3a472dfb447ea2b8c257d2b6f598;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;hp=be95845a7e2302d46d63876252cc11aef09b28e1;hpb=c0aba5b728b0a921d95ec120aa638dab1520b42f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/protocolinterface.cpp b/src/modules/m_spanningtree/protocolinterface.cpp index be95845a7..aaf946333 100644 --- a/src/modules/m_spanningtree/protocolinterface.cpp +++ b/src/modules/m_spanningtree/protocolinterface.cpp @@ -1,8 +1,13 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2009 Daniel De Graaf - * Copyright (C) 2008 Craig Edwards + * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2018 Matt Schatz + * Copyright (C) 2012-2014 Attila Molnar + * Copyright (C) 2012 Robby + * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2008 Robin Burchell + * Copyright (C) 2008 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -38,13 +43,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; @@ -65,13 +70,13 @@ bool SpanningTreeProtocolInterface::SendEncapsulatedData(const std::string& targ return false; // Use the SID of the target in the message instead of the server name - encap.push(server->GetID()).push(cmd).insert(params).Unicast(server->ServerUser); + encap.push(server->GetId()).push(cmd).insert(params).Unicast(server->ServerUser); } 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; @@ -111,13 +116,14 @@ void SpanningTreeProtocolInterface::SendMessage(Channel* target, char status, co { 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->FakeClient, target, text, status, tags, exempt_list, cmd); } void SpanningTreeProtocolInterface::SendMessage(User* target, const std::string& text, MessageType msgtype) { CmdBuilder p(msgtype == MSG_PRIVMSG ? "PRIVMSG" : "NOTICE"); - p.push_back(target->uuid); + p.push(target->uuid); p.push_last(text); p.Unicast(target); }