mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
m_spanningtree: Parse and copy message tags for all cmds
Don't ignore message tags on ServerCommands, and avoid creating duplicate CommandBase::Params instances
This commit is contained in:
parent
d4aab8d30a
commit
095d0e6154
@ -377,21 +377,24 @@ void TreeSocket::ProcessConnectedLine(std::string& taglist, std::string& prefix,
|
|||||||
|
|
||||||
CmdResult res;
|
CmdResult res;
|
||||||
ClientProtocol::TagMap tags;
|
ClientProtocol::TagMap tags;
|
||||||
|
std::string tag;
|
||||||
|
irc::sepstream tagstream(taglist, ';');
|
||||||
|
while (tagstream.GetToken(tag))
|
||||||
|
ProcessTag(who, tag, tags);
|
||||||
|
|
||||||
|
CommandBase::Params newparams(params, tags);
|
||||||
|
|
||||||
if (scmd)
|
if (scmd)
|
||||||
res = scmd->Handle(who, params);
|
res = scmd->Handle(who, newparams);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string tag;
|
res = cmd->Handle(who, newparams);
|
||||||
irc::sepstream tagstream(taglist, ';');
|
|
||||||
while (tagstream.GetToken(tag))
|
|
||||||
ProcessTag(who, tag, tags);
|
|
||||||
res = cmd->Handle(who, CommandBase::Params(params, tags));
|
|
||||||
if (res == CMD_INVALID)
|
if (res == CMD_INVALID)
|
||||||
throw ProtocolException("Error in command handler");
|
throw ProtocolException("Error in command handler");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res == CMD_SUCCESS)
|
if (res == CMD_SUCCESS)
|
||||||
Utils->RouteCommand(server->GetRoute(), cmdbase, CommandBase::Params(params, tags), who);
|
Utils->RouteCommand(server->GetRoute(), cmdbase, newparams, who);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TreeSocket::OnTimeout()
|
void TreeSocket::OnTimeout()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user