Fixed major bug EXT-6544 - remove Admin > God Tools > Grid > Kick All Residents button.
Removed "Kick all" button and corresponding code. Reviewed by Mike Antipov - https://codereview.productengine.com/secondlife/r/117/ --HG-- branch : product-enginemeow-7.2.2
parent
b846bc1fe4
commit
56fa20e168
|
|
@ -828,7 +828,6 @@ const F32 HOURS_TO_RADIANS = (2.f*F_PI)/24.f;
|
|||
LLPanelGridTools::LLPanelGridTools() :
|
||||
LLPanel()
|
||||
{
|
||||
mCommitCallbackRegistrar.add("GridTools.KickAll", boost::bind(&LLPanelGridTools::onClickKickAll, this));
|
||||
mCommitCallbackRegistrar.add("GridTools.FlushMapVisibilityCaches", boost::bind(&LLPanelGridTools::onClickFlushMapVisibilityCaches, this));
|
||||
}
|
||||
|
||||
|
|
@ -846,46 +845,6 @@ void LLPanelGridTools::refresh()
|
|||
{
|
||||
}
|
||||
|
||||
void LLPanelGridTools::onClickKickAll()
|
||||
{
|
||||
LLNotificationsUtil::add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick);
|
||||
}
|
||||
|
||||
|
||||
bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
if (LLNotificationsUtil::getSelectedOption(notification, response) == 0)
|
||||
{
|
||||
LLSD payload;
|
||||
payload["kick_message"] = response["message"].asString();
|
||||
LLNotificationsUtil::add("ConfirmKick", LLSD(), payload, LLPanelGridTools::finishKick);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
||||
msg->newMessageFast(_PREHASH_GodKickUser);
|
||||
msg->nextBlockFast(_PREHASH_UserInfo);
|
||||
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_AgentID, LL_UUID_ALL_AGENTS );
|
||||
msg->addU32("KickFlags", KICK_FLAGS_DEFAULT );
|
||||
msg->addStringFast(_PREHASH_Reason, notification["payload"]["kick_message"].asString());
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLPanelGridTools::onClickFlushMapVisibilityCaches()
|
||||
{
|
||||
LLNotificationsUtil::add("FlushMapVisibilityCaches", LLSD(), LLSD(), flushMapVisibilityCachesConfirm);
|
||||
|
|
|
|||
|
|
@ -198,9 +198,6 @@ public:
|
|||
|
||||
void refresh();
|
||||
|
||||
void onClickKickAll();
|
||||
static bool confirmKick(const LLSD& notification, const LLSD& response);
|
||||
static bool finishKick(const LLSD& notification, const LLSD& response);
|
||||
static void onDragSunPhase(LLUICtrl *ctrl, void *userdata);
|
||||
void onClickFlushMapVisibilityCaches();
|
||||
static bool flushMapVisibilityCachesConfirm(const LLSD& notification, const LLSD& response);
|
||||
|
|
|
|||
|
|
@ -28,19 +28,6 @@
|
|||
name="grid"
|
||||
top="16"
|
||||
width="398">
|
||||
<button
|
||||
follows="left|top"
|
||||
height="20"
|
||||
label="Kick all Residents"
|
||||
label_selected="Kick all Residents"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="Kick all users"
|
||||
top="30"
|
||||
width="120">
|
||||
<button.commit_callback
|
||||
function="GridTools.KickAll" />
|
||||
</button>
|
||||
<button
|
||||
follows="left|top"
|
||||
height="20"
|
||||
|
|
|
|||
Loading…
Reference in New Issue