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>
|
<key>Value</key>
|
||||||
<string>/away</string>
|
<string>/away</string>
|
||||||
</map>
|
</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>
|
<key>SinguCmdLineURL</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ LLPrefsAscentSys::LLPrefsAscentSys()
|
|||||||
getChild<LLUICtrl>("AscentCmdLineMapTo")->setCommitCallback(lineEditorControl);
|
getChild<LLUICtrl>("AscentCmdLineMapTo")->setCommitCallback(lineEditorControl);
|
||||||
getChild<LLUICtrl>("AscentCmdLineTP2")->setCommitCallback(lineEditorControl);
|
getChild<LLUICtrl>("AscentCmdLineTP2")->setCommitCallback(lineEditorControl);
|
||||||
getChild<LLUICtrl>("SinguCmdLineAway")->setCommitCallback(lineEditorControl);
|
getChild<LLUICtrl>("SinguCmdLineAway")->setCommitCallback(lineEditorControl);
|
||||||
|
getChild<LLUICtrl>("SinguCmdLineRegionSay")->setCommitCallback(lineEditorControl);
|
||||||
getChild<LLUICtrl>("SinguCmdLineURL")->setCommitCallback(lineEditorControl);
|
getChild<LLUICtrl>("SinguCmdLineURL")->setCommitCallback(lineEditorControl);
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
@@ -180,6 +181,7 @@ void LLPrefsAscentSys::refreshValues()
|
|||||||
mCmdMapToKeepPos = gSavedSettings.getBOOL("AscentMapToKeepPos");
|
mCmdMapToKeepPos = gSavedSettings.getBOOL("AscentMapToKeepPos");
|
||||||
mCmdLineTP2 = gSavedSettings.getString("AscentCmdLineTP2");
|
mCmdLineTP2 = gSavedSettings.getString("AscentCmdLineTP2");
|
||||||
mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
|
mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
|
||||||
|
mCmdLineRegionSay = gSavedSettings.getString("SinguCmdLineRegionSay");
|
||||||
mCmdLineURL = gSavedSettings.getString("SinguCmdLineURL");
|
mCmdLineURL = gSavedSettings.getString("SinguCmdLineURL");
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
@@ -247,6 +249,7 @@ void LLPrefsAscentSys::refresh()
|
|||||||
childSetValue("AscentCmdLineMapTo", mCmdLineMapTo);
|
childSetValue("AscentCmdLineMapTo", mCmdLineMapTo);
|
||||||
childSetValue("AscentCmdLineTP2", mCmdLineTP2);
|
childSetValue("AscentCmdLineTP2", mCmdLineTP2);
|
||||||
childSetValue("SinguCmdLineAway", mCmdLineAway);
|
childSetValue("SinguCmdLineAway", mCmdLineAway);
|
||||||
|
childSetValue("SinguCmdLineRegionSay", mCmdLineRegionSay);
|
||||||
childSetValue("SinguCmdLineURL", mCmdLineURL);
|
childSetValue("SinguCmdLineURL", mCmdLineURL);
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
@@ -317,6 +320,7 @@ void LLPrefsAscentSys::cancel()
|
|||||||
gSavedSettings.setBOOL("AscentMapToKeepPos", mCmdMapToKeepPos);
|
gSavedSettings.setBOOL("AscentMapToKeepPos", mCmdMapToKeepPos);
|
||||||
gSavedSettings.setString("AscentCmdLineTP2", mCmdLineTP2);
|
gSavedSettings.setString("AscentCmdLineTP2", mCmdLineTP2);
|
||||||
gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
|
gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
|
||||||
|
gSavedSettings.setString("SinguCmdLineRegionSay", mCmdLineRegionSay);
|
||||||
gSavedSettings.setString("SinguCmdLineURL", mCmdLineURL);
|
gSavedSettings.setString("SinguCmdLineURL", mCmdLineURL);
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ private:
|
|||||||
bool mCmdMapToKeepPos;
|
bool mCmdMapToKeepPos;
|
||||||
std::string mCmdLineTP2;
|
std::string mCmdLineTP2;
|
||||||
std::string mCmdLineAway;
|
std::string mCmdLineAway;
|
||||||
|
std::string mCmdLineRegionSay;
|
||||||
std::string mCmdLineURL;
|
std::string mCmdLineURL;
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -38,35 +38,29 @@
|
|||||||
#include "llchatbar.h"
|
#include "llchatbar.h"
|
||||||
#include "llagent.h"
|
#include "llagent.h"
|
||||||
#include "llagentcamera.h"
|
#include "llagentcamera.h"
|
||||||
#include "stdtypes.h"
|
#include "llagentui.h"
|
||||||
#include "llviewerregion.h"
|
#include "llviewerregion.h"
|
||||||
#include "llworld.h"
|
#include "llworld.h"
|
||||||
#include "lluuid.h"
|
|
||||||
#include "lleventtimer.h"
|
#include "lleventtimer.h"
|
||||||
#include "llviewercontrol.h"
|
|
||||||
|
|
||||||
#include "material_codes.h"
|
|
||||||
#include "llvolume.h"
|
#include "llvolume.h"
|
||||||
#include "object_flags.h"
|
|
||||||
#include "llvolumemessage.h"
|
#include "llvolumemessage.h"
|
||||||
#include "llurldispatcher.h"
|
#include "llurldispatcher.h"
|
||||||
#include "llworld.h"
|
#include "llworld.h"
|
||||||
#include "llworldmap.h"
|
#include "llworldmap.h"
|
||||||
#include "llfloateravatarlist.h"
|
#include "llfloateravatarlist.h"
|
||||||
|
#include "llfloaterregioninfo.h"
|
||||||
#include "llviewerobjectlist.h"
|
#include "llviewerobjectlist.h"
|
||||||
#include "llviewertexteditor.h"
|
#include "llviewertexteditor.h"
|
||||||
#include "llviewermenu.h"
|
#include "llviewermenu.h"
|
||||||
#include "llvoavatar.h"
|
#include "llvoavatar.h"
|
||||||
#include "lltooldraganddrop.h"
|
#include "lltooldraganddrop.h"
|
||||||
#include "llinventorymodel.h"
|
#include "llinventorymodel.h"
|
||||||
|
#include "llregioninfomodel.h"
|
||||||
#include "llselectmgr.h"
|
#include "llselectmgr.h"
|
||||||
#include "llslurl.h"
|
#include "llslurl.h"
|
||||||
#include "llurlaction.h"
|
#include "llurlaction.h"
|
||||||
|
|
||||||
#include <iosfwd>
|
|
||||||
|
|
||||||
#include <float.h>
|
|
||||||
|
|
||||||
#include "llchat.h"
|
#include "llchat.h"
|
||||||
|
|
||||||
#include "llfloaterchat.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> sAscentCmdLineTP2(gSavedSettings, "AscentCmdLineTP2");
|
||||||
static LLCachedControl<std::string> sAscentCmdLineClearChat(gSavedSettings, "AscentCmdLineClearChat");
|
static LLCachedControl<std::string> sAscentCmdLineClearChat(gSavedSettings, "AscentCmdLineClearChat");
|
||||||
static LLCachedControl<std::string> sSinguCmdLineAway(gSavedSettings, "SinguCmdLineAway");
|
static LLCachedControl<std::string> sSinguCmdLineAway(gSavedSettings, "SinguCmdLineAway");
|
||||||
|
static LLCachedControl<std::string> sSinguCmdLineRegionSay(gSavedSettings, "SinguCmdLineRegionSay");
|
||||||
static LLCachedControl<std::string> sSinguCmdLineURL(gSavedSettings, "SinguCmdLineURL");
|
static LLCachedControl<std::string> sSinguCmdLineURL(gSavedSettings, "SinguCmdLineURL");
|
||||||
|
|
||||||
if(sAscentCmdLine)
|
if(sAscentCmdLine)
|
||||||
@@ -437,6 +432,23 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
|
|||||||
}
|
}
|
||||||
return false;
|
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")
|
else if(command == "typingstop")
|
||||||
{
|
{
|
||||||
std::string text;
|
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"/>
|
<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>
|
<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"/>
|
<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>
|
||||||
|
|
||||||
<panel border="true" left="1" bottom="-408" height="408" width="500" label="Security & Privacy" name="Security">
|
<panel border="true" left="1" bottom="-408" height="408" width="500" label="Security & Privacy" name="Security">
|
||||||
|
|||||||
Reference in New Issue
Block a user