Solve SV-2103: Estate Kick was Teleporting Home, which wasn't always a kick

Estate Kick button now offers choice between Kicking Home and Kicking Out.
Estate Ban always kicks out

Translators: Please update SV-2103 in notifications.xml appropriately
This commit is contained in:
Lirusaito
2016-07-06 00:51:28 -04:00
parent 755d4c242b
commit 9fe563c9f3
3 changed files with 13 additions and 9 deletions

View File

@@ -1398,7 +1398,8 @@ static void cmd_freeze(const LLAvatarListEntry* entry) { send_freeze(entry->get
static void cmd_unfreeze(const LLAvatarListEntry* entry) { send_freeze(entry->getID(), false); } static void cmd_unfreeze(const LLAvatarListEntry* entry) { send_freeze(entry->getID(), false); }
static void cmd_eject(const LLAvatarListEntry* entry) { send_eject(entry->getID(), false); } static void cmd_eject(const LLAvatarListEntry* entry) { send_eject(entry->getID(), false); }
static void cmd_ban(const LLAvatarListEntry* entry) { send_eject(entry->getID(), true); } static void cmd_ban(const LLAvatarListEntry* entry) { send_eject(entry->getID(), true); }
static void cmd_estate_eject(const LLAvatarListEntry* entry){ send_estate_message("teleporthomeuser", entry->getID()); } static void cmd_estate_eject(const LLAvatarListEntry* entry){ send_estate_message("kickestate", entry->getID()); }
static void cmd_estate_tp_home(const LLAvatarListEntry* entry){ send_estate_message("teleporthomeuser", entry->getID()); }
static void cmd_estate_ban(const LLAvatarListEntry* entry) { LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, entry->getID()); } static void cmd_estate_ban(const LLAvatarListEntry* entry) { LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, entry->getID()); }
void LLFloaterAvatarList::doCommand(avlist_command_t func, bool single/*=false*/) const void LLFloaterAvatarList::doCommand(avlist_command_t func, bool single/*=false*/) const
@@ -1469,8 +1470,9 @@ void LLFloaterAvatarList::callbackEjectFromEstate(const LLSD& notification, cons
{ {
if (!instanceExists()) return; if (!instanceExists()) return;
LLFloaterAvatarList& inst(instance()); LLFloaterAvatarList& inst(instance());
if (!LLNotification::getSelectedOption(notification, response)) // if == 0 S32 option = LLNotification::getSelectedOption(notification, response);
inst.doCommand(cmd_estate_eject); if (option != 2)
inst.doCommand(option ? cmd_estate_tp_home : cmd_estate_eject);
} }
//static //static

View File

@@ -9182,17 +9182,18 @@ class ListFreeze : public view_listener_t
} }
}; };
void estate_bulk_eject(const uuid_vec_t& ids, bool ban, S32 zero) void estate_bulk_eject(const uuid_vec_t& ids, bool ban, S32 option)
{ {
if (ids.empty() || zero != 0) return; if (ids.empty() || option == (ban ? 1 : 2)) return;
std::vector<std::string> strings(2, gAgentID.asString()); // [0] = our agent id std::vector<std::string> strings(2, gAgentID.asString()); // [0] = our agent id
const std::string request(option == 1 ? "teleporthomeuser" : "kickestate");
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{ {
LLUUID id(*it); LLUUID id(*it);
if (id.isNull()) continue; if (id.isNull()) continue;
strings[1] = id.asString(); // [1] = target agent id strings[1] = id.asString(); // [1] = target agent id
LLRegionInfoModel::sendEstateOwnerMessage(gMessageSystem, "teleporthomeuser", LLFloaterRegionInfo::getLastInvoice(), strings); LLRegionInfoModel::sendEstateOwnerMessage(gMessageSystem, request, LLFloaterRegionInfo::getLastInvoice(), strings);
if (ban) if (ban)
LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, id); LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, id);
} }

View File

@@ -4164,9 +4164,10 @@ Remove estate manager for this estate only or for [ALL_ESTATES]?
Kick [EVIL_USER] from this estate? Kick [EVIL_USER] from this estate?
<tag>confirm</tag> <tag>confirm</tag>
<usetemplate <usetemplate
name="okcancelbuttons" canceltext="Cancel"
notext="Cancel" name="yesnocancelbuttons"
yestext="OK"/> notext="Kick Home"
yestext="Kick"/>
</notification> </notification>
<notification <notification