Feature Request: chatbar as commandline "/regionsay msg" to do region-wide messages without needing to go through the region/estate floater.
This commit is contained in:
@@ -686,6 +686,17 @@
|
||||
<key>Value</key>
|
||||
<string>/away</string>
|
||||
</map>
|
||||
<key>SinguCmdLineRegionSay</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Command prefix for chat to say to entire region, if allowed(EM).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>/regionsay</string>
|
||||
</map>
|
||||
<key>SinguCmdLineURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -71,6 +71,7 @@ LLPrefsAscentSys::LLPrefsAscentSys()
|
||||
getChild<LLUICtrl>("AscentCmdLineMapTo")->setCommitCallback(lineEditorControl);
|
||||
getChild<LLUICtrl>("AscentCmdLineTP2")->setCommitCallback(lineEditorControl);
|
||||
getChild<LLUICtrl>("SinguCmdLineAway")->setCommitCallback(lineEditorControl);
|
||||
getChild<LLUICtrl>("SinguCmdLineRegionSay")->setCommitCallback(lineEditorControl);
|
||||
getChild<LLUICtrl>("SinguCmdLineURL")->setCommitCallback(lineEditorControl);
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
@@ -180,6 +181,7 @@ void LLPrefsAscentSys::refreshValues()
|
||||
mCmdMapToKeepPos = gSavedSettings.getBOOL("AscentMapToKeepPos");
|
||||
mCmdLineTP2 = gSavedSettings.getString("AscentCmdLineTP2");
|
||||
mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
|
||||
mCmdLineRegionSay = gSavedSettings.getString("SinguCmdLineRegionSay");
|
||||
mCmdLineURL = gSavedSettings.getString("SinguCmdLineURL");
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
@@ -247,6 +249,7 @@ void LLPrefsAscentSys::refresh()
|
||||
childSetValue("AscentCmdLineMapTo", mCmdLineMapTo);
|
||||
childSetValue("AscentCmdLineTP2", mCmdLineTP2);
|
||||
childSetValue("SinguCmdLineAway", mCmdLineAway);
|
||||
childSetValue("SinguCmdLineRegionSay", mCmdLineRegionSay);
|
||||
childSetValue("SinguCmdLineURL", mCmdLineURL);
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
@@ -317,6 +320,7 @@ void LLPrefsAscentSys::cancel()
|
||||
gSavedSettings.setBOOL("AscentMapToKeepPos", mCmdMapToKeepPos);
|
||||
gSavedSettings.setString("AscentCmdLineTP2", mCmdLineTP2);
|
||||
gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
|
||||
gSavedSettings.setString("SinguCmdLineRegionSay", mCmdLineRegionSay);
|
||||
gSavedSettings.setString("SinguCmdLineURL", mCmdLineURL);
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
|
||||
@@ -94,6 +94,7 @@ private:
|
||||
bool mCmdMapToKeepPos;
|
||||
std::string mCmdLineTP2;
|
||||
std::string mCmdLineAway;
|
||||
std::string mCmdLineRegionSay;
|
||||
std::string mCmdLineURL;
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
|
||||
@@ -38,35 +38,29 @@
|
||||
#include "llchatbar.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "stdtypes.h"
|
||||
#include "llagentui.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llworld.h"
|
||||
#include "lluuid.h"
|
||||
#include "lleventtimer.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
#include "material_codes.h"
|
||||
#include "llvolume.h"
|
||||
#include "object_flags.h"
|
||||
#include "llvolumemessage.h"
|
||||
#include "llurldispatcher.h"
|
||||
#include "llworld.h"
|
||||
#include "llworldmap.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "llfloaterregioninfo.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llregioninfomodel.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llslurl.h"
|
||||
#include "llurlaction.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include "llchat.h"
|
||||
|
||||
#include "llfloaterchat.h"
|
||||
@@ -239,6 +233,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
|
||||
static LLCachedControl<std::string> sAscentCmdLineTP2(gSavedSettings, "AscentCmdLineTP2");
|
||||
static LLCachedControl<std::string> sAscentCmdLineClearChat(gSavedSettings, "AscentCmdLineClearChat");
|
||||
static LLCachedControl<std::string> sSinguCmdLineAway(gSavedSettings, "SinguCmdLineAway");
|
||||
static LLCachedControl<std::string> sSinguCmdLineRegionSay(gSavedSettings, "SinguCmdLineRegionSay");
|
||||
static LLCachedControl<std::string> sSinguCmdLineURL(gSavedSettings, "SinguCmdLineURL");
|
||||
|
||||
if(sAscentCmdLine)
|
||||
@@ -437,6 +432,23 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if(command == utf8str_tolower(sSinguCmdLineRegionSay))
|
||||
{
|
||||
if (revised_text.length() > command.length() + 1)
|
||||
{
|
||||
std::vector<std::string> strings(5, "-1");
|
||||
// [0] grid_x, unused here
|
||||
// [1] grid_y, unused here
|
||||
strings[2] = gAgentID.asString(); // [2] agent_id of sender
|
||||
// [3] sender name
|
||||
std::string name;
|
||||
LLAgentUI::buildFullname(name);
|
||||
strings[3] = name;
|
||||
strings[4] = revised_text.substr(command.length()+1); // [4] message
|
||||
LLRegionInfoModel::sendEstateOwnerMessage(gMessageSystem, "simulatormessage", LLFloaterRegionInfo::getLastInvoice(), strings);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if(command == "typingstop")
|
||||
{
|
||||
std::string text;
|
||||
|
||||
@@ -80,6 +80,8 @@
|
||||
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" tool_tip="The syntax of this command allows partial names and is not case sensitive. Better results if used while the Radar is open." name="AscentCmdLineTP2" width="200"/>
|
||||
<text enabled_control="AscentCmdLine" bottom_delta="-18" follows="top" height="16" name="cmd_line_text_14">Toggle Fake Away Status (usage: cmd)</text>
|
||||
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="SinguCmdLineAway" width="200"/>
|
||||
<text enabled_control="AscentCmdLine" bottom_delta="-18" follows="top" height="16" name="cmd_line_text_15">Send region message (usage: cmd msg)</text>
|
||||
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="SinguCmdLineRegionSay" tool_tip="Only works on permissive regions (Estate Managers only)" width="200"/>
|
||||
</panel>
|
||||
|
||||
<panel border="true" left="1" bottom="-408" height="408" width="500" label="Security & Privacy" name="Security">
|
||||
|
||||
Reference in New Issue
Block a user