From 55122dd47b6952ee4e15aef0a6eeeec14ef7e948 Mon Sep 17 00:00:00 2001 From: cinder <cinder@cinderblocks.biz> Date: Thu, 1 Dec 2022 22:02:14 -0600 Subject: [PATCH] Add /sendmenu to chat commands phor phun --- indra/newview/alchatcommand.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/indra/newview/alchatcommand.cpp b/indra/newview/alchatcommand.cpp index cf5f62ac69c..0315e1a918d 100644 --- a/indra/newview/alchatcommand.cpp +++ b/indra/newview/alchatcommand.cpp @@ -325,6 +325,27 @@ bool ALChatCommand::parseCommand(std::string data) } } } + else if (cmd == "/sendmenu") + { + S32 channel; + if (!(input >> channel)) + return false; + std::string button; + if (!(input >> button)) + return false; + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ScriptDialogReply); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_Data); + msg->addUUIDFast(_PREHASH_ObjectID, gAgent.getID()); + msg->addS32(_PREHASH_ChatChannel, channel); + msg->addS32Fast(_PREHASH_ButtonIndex, 0); + msg->addStringFast(_PREHASH_ButtonLabel, button); + gAgent.sendReliableMessage(); + return true; + } } return false; } -- GitLab