Make /regionsay fall back on normal chat pipes

This commit is contained in:
Inusaito Sayori
2015-04-04 15:47:20 -04:00
parent 0d27d0cbc7
commit f514243c1b
2 changed files with 8 additions and 2 deletions

View File

@@ -452,6 +452,12 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
{
if (revised_text.length() > command.length() + 1)
{
const std::string& message = revised_text.substr(command.length()+1);
if (!gAgent.getRegion()->isEstateManager())
{
gChatBar->sendChatFromViewer(message, CHAT_TYPE_REGION, false);
return false;
}
std::vector<std::string> strings(5, "-1");
// [0] grid_x, unused here
// [1] grid_y, unused here
@@ -460,7 +466,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
std::string name;
LLAgentUI::buildFullname(name);
strings[3] = name;
strings[4] = revised_text.substr(command.length()+1); // [4] message
strings[4] = message; // [4] message
LLRegionInfoModel::sendEstateOwnerMessage(gMessageSystem, "simulatormessage", LLFloaterRegionInfo::getLastInvoice(), strings);
}
return false;

View File

@@ -82,7 +82,7 @@
<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"/>
<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 properly on permissive regions (Estate Managers only), falls back on normal chat pipes" width="200"/>
<text enabled_control="AscentCmdLine" bottom_delta="-18" follows="top" height="16" name="hover_txt">Hover Height (usage: cmd height)</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="AlchemyChatCommandHoverHeight" width="200"/>
</panel>