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;
|
||||
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)
|
||||
res = scmd->Handle(who, params);
|
||||
res = scmd->Handle(who, newparams);
|
||||
else
|
||||
{
|
||||
std::string tag;
|
||||
irc::sepstream tagstream(taglist, ';');
|
||||
while (tagstream.GetToken(tag))
|
||||
ProcessTag(who, tag, tags);
|
||||
res = cmd->Handle(who, CommandBase::Params(params, tags));
|
||||
res = cmd->Handle(who, newparams);
|
||||
if (res == CMD_INVALID)
|
||||
throw ProtocolException("Error in command handler");
|
||||
}
|
||||
|
||||
if (res == CMD_SUCCESS)
|
||||
Utils->RouteCommand(server->GetRoute(), cmdbase, CommandBase::Params(params, tags), who);
|
||||
Utils->RouteCommand(server->GetRoute(), cmdbase, newparams, who);
|
||||
}
|
||||
|
||||
void TreeSocket::OnTimeout()
|
||||
|
Loading…
x
Reference in New Issue
Block a user