From 9538f966139178b16c88393db301666e6d82d04e Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 21 Dec 2009 15:33:06 -0800 Subject: EXT-3523 Missing God Mode functions in User Profile EXT-2635 No message reminding user that a restart is required to reset cache (was Clear Cache) reviewed by Richard --- indra/newview/llavataractions.cpp | 109 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 636b1de4d4..a98de900c8 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -336,6 +336,54 @@ void LLAvatarActions::pay(const LLUUID& id) } } +// static +void LLAvatarActions::kick(const LLUUID& id) +{ + LLSD payload; + payload["avatar_id"] = id; + LLNotifications::instance().add("KickUser", LLSD(), payload, handleKick); +} + +// static +void LLAvatarActions::freeze(const LLUUID& id) +{ + LLSD payload; + payload["avatar_id"] = id; + LLNotifications::instance().add("FreezeUser", LLSD(), payload, handleFreeze); +} + +// static +void LLAvatarActions::unfreeze(const LLUUID& id) +{ + LLSD payload; + payload["avatar_id"] = id; + LLNotifications::instance().add("UnFreezeUser", LLSD(), payload, handleUnfreeze); +} + +//static +void LLAvatarActions::csr(const LLUUID& id, std::string name) +{ + if (name.empty()) return; + + std::string url = "http://csr.lindenlab.com/agent/"; + + // slow and stupid, but it's late + S32 len = name.length(); + for (S32 i = 0; i < len; i++) + { + if (name[i] == ' ') + { + url += "%20"; + } + else + { + url += name[i]; + } + } + + LLWeb::loadURL(url); +} + //static void LLAvatarActions::share(const LLUUID& id) { @@ -459,6 +507,67 @@ bool LLAvatarActions::callbackAddFriendWithMessage(const LLSD& notification, con return false; } +// static +bool LLAvatarActions::handleKick(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + + if (option == 0) + { + LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); + 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, avatar_id ); + msg->addU32("KickFlags", KICK_FLAGS_DEFAULT ); + msg->addStringFast(_PREHASH_Reason, response["message"].asString() ); + gAgent.sendReliableMessage(); + } + return false; +} +bool LLAvatarActions::handleFreeze(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + + if (option == 0) + { + LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); + 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, avatar_id ); + msg->addU32("KickFlags", KICK_FLAGS_FREEZE ); + msg->addStringFast(_PREHASH_Reason, response["message"].asString() ); + gAgent.sendReliableMessage(); + } + return false; +} +bool LLAvatarActions::handleUnfreeze(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + std::string text = response["message"].asString(); + if (option == 0) + { + LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); + 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, avatar_id ); + msg->addU32("KickFlags", KICK_FLAGS_UNFREEZE ); + msg->addStringFast(_PREHASH_Reason, text ); + gAgent.sendReliableMessage(); + } + return false; +} // static bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& response) { -- cgit v1.2.3 From 304e321f89e9a517ba90d6b41999a65591639ad9 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 22 Dec 2009 16:39:56 +0200 Subject: implemented EXT-3515 Click on IM button for multiple selected Avatars each time creates new IM session --HG-- branch : product-engine --- indra/newview/llavataractions.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index c5a1ffdcb3..9f7a36e209 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -243,7 +243,6 @@ void LLAvatarActions::startAdhocCall(const std::vector& ids) return; } - // start the call once the session has fully initialized gIMMgr->autoStartCallOnStartup(session_id); make_ui_sound("UISndStartIM"); -- cgit v1.2.3