meow-7.2.2
Nicky 2013-08-14 21:08:59 +02:00
commit e7527618f0
18 changed files with 184 additions and 70 deletions

View File

@ -1149,8 +1149,18 @@ void mask_to_string(U32 mask, char* str)
else
{
*str = ' ';
}
str++;
}
// <FS:CR> OpenSim export permission
if (mask & PERM_EXPORT)
{
*str = 'X';
}
else
{
*str = ' ';
}
// </FS:CR>
str++;
*str = '\0';
}

View File

@ -274,6 +274,7 @@ public:
inline bool allowModifyBy(const LLUUID &agent_id, const LLUUID& group) const;
inline bool allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const;
inline bool allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const;
inline bool allowExportBy(const LLUUID& agent_id) const; // <FS:CR> OpenSim export permission
// This somewhat specialized function is meant for testing if the
// current owner is allowed to transfer to the specified agent id.
@ -373,6 +374,13 @@ bool LLPermissions::allowTransferTo(const LLUUID &agent_id) const
}
}
// <FS:CR> Opensim Export Permissions
bool LLPermissions::allowExportBy(const LLUUID& agent) const
{
return ((mCreator == agent) ? true : (allowOperationBy(PERM_EXPORT, agent, LLUUID::null)));
}
// </FS:CR>
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLAggregatePermissions
//

View File

@ -46,6 +46,10 @@ const PermissionBit PERM_MODIFY = (1 << 14); // 0x00004000
// objects, allow copy
const PermissionBit PERM_COPY = (1 << 15); // 0x00008000
// <FS:CR> OpenSim export permission
const PermissionBit PERM_EXPORT = (1 << 16); // 0x00010000
// </FS:CR>
// parcels, allow entry, deprecated
//const PermissionBit PERM_ENTER = (1 << 16); // 0x00010000

View File

@ -156,7 +156,7 @@ S32 NACLAntiSpamQueue::checkEntry(const LLUUID& name, U32 multiplier)
}
else
{
lldebugs << "[antispam] New queue entry:" << name.asString() << llendl;
LL_DEBUGS("AntiSpam") << "New queue entry:" << name.asString() << LL_ENDL;
NACLAntiSpamQueueEntry* entry = new NACLAntiSpamQueueEntry();
entry->updateEntryAmount();
entry->updateEntryTime();
@ -371,14 +371,16 @@ bool NACLAntiSpamRegistry::checkQueue(EAntispamQueue queue, const LLUUID& source
if (result == 1) // newly blocked, result == 1
{
std::string msg = llformat("AntiSpam: Blocked %s for spamming a %s (%d) times in %d seconds.", source.asString().c_str(), getQueueName(queue), multiplier * mQueues[queue]->getAmount(), mQueues[queue]->getTime());
if (!silent)
{
LLSD args;
args["MESSAGE"] = msg;
LLNotificationsUtil::add("SystemMessageTip", args);
args["SOURCE"] = source.asString();
args["QUEUE"] = getQueueName(queue);
args["COUNT"] = llformat("%d", multiplier * mQueues[queue]->getAmount());
args["PERIOD"] = llformat("%d", mQueues[queue]->getTime());
LLNotificationsUtil::add("AntiSpamBlocked", args);
}
llinfos << "[antispam] " << msg << llendl;
LL_INFOS("AntiSpam") << "Blocked " << source.asString() << " for spamming a " << getQueueName(queue) << " (" << multiplier * mQueues[queue]->getAmount() << ") times in " << mQueues[queue]->getTime() << " seconds." << LL_ENDL;
return true;
}
@ -437,7 +439,7 @@ void NACLAntiSpamRegistry::purgeAllQueues()
}
}
}
llinfos << "AntiSpam Queues Purged" << llendl;
LL_INFOS("AntiSpam") << "AntiSpam Queues Purged" << LL_ENDL;
}
S32 NACLAntiSpamRegistry::checkGlobalEntry(const LLUUID& source, U32 multiplier)

View File

@ -20899,7 +20899,7 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>FSLegacyRadarFriendColoring</key>
<map>

View File

@ -295,13 +295,28 @@ void FSExport::addPrim(LLViewerObject* object, bool root)
default_prim = false;
}
#if OPENSIM
if (LLGridManager::getInstance()->isInOpenSim()
&& object->permYouOwner()
&& object->permModify()
&& object->permCopy()
&& object->permTransfer())
if (LLGridManager::getInstance()->isInOpenSim())
{
default_prim = false;
LLViewerRegion* region = gAgent.getRegion();
if (region->regionSupportsExport() == LLViewerRegion::EXPORT_ALLOWED)
{
default_prim = !node->mPermissions->allowExportBy(gAgent.getID());
}
else if (region->regionSupportsExport() == LLViewerRegion::EXPORT_DENIED)
{
// Only your own creations if this is explicitly set
default_prim = (!(object->permYouOwner()
&& gAgentID == node->mPermissions->getCreator()));
}
/// TODO: Once enough grids adopt a version supporting the exports cap, get consensus
/// on whether we should allow full perm exports anymore.
else // LLViewerRegion::EXPORT_UNDEFINED
{
default_prim = (!(object->permYouOwner()
&& object->permModify()
&& object->permCopy()
&& object->permTransfer()));
}
}
#endif
}
@ -748,9 +763,23 @@ bool FSExport::assetCheck(LLUUID asset_id, std::string& name, std::string& descr
{
LLPermissions perms = items[i]->getPermissions();
#if OPENSIM
if (LLGridManager::getInstance()->isInOpenSim() && ((perms.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED))
if (LLGridManager::getInstance()->isInOpenSim())
{
exportable = true;
LLViewerRegion* region = gAgent.getRegion();
if (region->regionSupportsExport() == LLViewerRegion::EXPORT_ALLOWED)
{
exportable = (perms.getMaskOwner() & PERM_EXPORT) == PERM_EXPORT;
}
else if (region->regionSupportsExport() == LLViewerRegion::EXPORT_DENIED)
{
exportable = perms.getCreator() == gAgentID;
}
/// TODO: Once enough grids adopt a version supporting the exports cap, get consensus
/// on whether we should allow full perm exports anymore.
else
{
exportable = (perms.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
}
}
#endif
if (LLGridManager::getInstance()->isInSecondLife() && (perms.getCreator() == gAgentID))
@ -785,9 +814,23 @@ void FSExport::inventoryChanged(LLViewerObject* object, LLInventoryObject::objec
bool exportable = false;
LLPermissions perms = item->getPermissions();
#if OPENSIM
if (LLGridManager::getInstance()->isInOpenSim() && ((perms.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED))
if (LLGridManager::getInstance()->isInOpenSim())
{
exportable = true;
LLViewerRegion* region = gAgent.getRegion();
if (region->regionSupportsExport() == LLViewerRegion::EXPORT_ALLOWED)
{
exportable = (perms.getMaskOwner() & PERM_EXPORT) == PERM_EXPORT;
}
else if (region->regionSupportsExport() == LLViewerRegion::EXPORT_DENIED)
{
exportable = perms.getCreator() == gAgentID;
}
/// TODO: Once enough grids adopt a version supporting the exports cap, get consensus
/// on whether we should allow full perm exports anymore.
else
{
exportable = ((perms.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED);
}
}
#endif
if (LLGridManager::getInstance()->isInSecondLife() && (perms.getCreator() == gAgentID))

View File

@ -2921,10 +2921,14 @@ void FSPanelSearchWeb::loadURL(const FSFloaterSearch::SearchQuery &p)
url = debug_url;
}
else if(LLGridManager::getInstance()->isInOpenSim())
{
url = LLLoginInstance::getInstance()->hasResponse("search")
? LLLoginInstance::getInstance()->getResponse("search").asString()
: gSavedSettings.getString("SearchURLOpenSim");
{
std::string os_search_url = gAgent.getRegion()->getSearchServerURL();
if (!os_search_url.empty())
url = os_search_url;
else if (LLLoginInstance::getInstance()->hasResponse("search"))
url = LLLoginInstance::getInstance()->getResponse("search").asString();
else
url = gSavedSettings.getString("SearchURLOpenSim");
}
else
#endif // OPENSIM

View File

@ -170,7 +170,6 @@ void FSRadar::updateRadarList()
static LLCachedControl<bool> sUseLSLBridge(gSavedSettings, "UseLSLBridge");
static LLCachedControl<F32> RenderFarClip(gSavedSettings, "RenderFarClip");
static LLCachedControl<bool> sFSLegacyRadarFriendColoring(gSavedSettings, "FSLegacyRadarFriendColoring");
static LLCachedControl<bool> sFSLegacyRadarLindenColoring(gSavedSettings, "FSLegacyRadarLindenColoring");
F32 drawRadius(RenderFarClip);
const LLVector3d& posSelf = gAgent.getPositionGlobal();
@ -514,22 +513,12 @@ void FSRadar::updateRadarList()
}
entry_options["name_style"] = nameCellStyle;
// <FS:CR> TODO: Decide whether we want special colored names in the radar or let the current UI suffice
//LLColor4 name_color = LGGContactSets::getInstance()->colorize(avId, range_color, LGG_CS_RADAR);
//entry_options["name_color"] = name_color.getValue();
LLColor4 name_color;
LLColor4 name_color = LGGContactSets::getInstance()->colorize(avId, range_color, LGG_CS_RADAR);
if (LGGContactSets::getInstance()->hasFriendColorThatShouldShow(avId, LGG_CS_RADAR))
{
name_color = LGGContactSets::getInstance()->getFriendColor(avId);
}
else if (FSCommon::isLinden(avId) && sFSLegacyRadarLindenColoring)
{
name_color = LLUIColorTable::instance().getColor("MapAvatarLindenColor", LLColor4::black);
}
else if (relation && sFSLegacyRadarFriendColoring)
{
name_color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::black);
}
entry_options["name_color"] = name_color.getValue();
// Voice power level indicator

View File

@ -340,6 +340,8 @@ LLColor4 LGGContactSets::getGroupColor(const std::string& groupName)
LLColor4 LGGContactSets::colorize(const LLUUID& uuid, const LLColor4& cur_color, ELGGCSType type)
{
static LLCachedControl<bool> legacy_radar_friend(gSavedSettings, "FSLegacyRadarFriendColoring");
static LLCachedControl<bool> legacy_radar_linden(gSavedSettings, "FSLegacyRadarLindenColoring");
LLColor4 color = cur_color;
// Leave generic colors if RLV restricted
@ -405,6 +407,9 @@ LLColor4 LGGContactSets::colorize(const LLUUID& uuid, const LLColor4& cur_color,
color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::white);
break;
case LGG_CS_RADAR:
if (legacy_radar_friend)
color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::white);
break;
default:
llwarns << "Unhandled colorize case!" << llendl;
break;
@ -446,6 +451,9 @@ LLColor4 LGGContactSets::colorize(const LLUUID& uuid, const LLColor4& cur_color,
color = LLUIColorTable::instance().getColor("MapAvatarLindenColor", LLColor4::blue);
break;
case LGG_CS_RADAR:
if (legacy_radar_linden)
color = LLUIColorTable::instance().getColor("MapAvatarLindenColor", LLColor4::blue);
break;
default:
llwarns << "Unhandled colorize case!" << llendl;
break;

View File

@ -2327,6 +2327,12 @@ void LLAgent::endAnimationUpdateUI()
mViewsPushed = FALSE;
gFocusMgr.setKeyboardFocus(NULL); // <FS:Zi> make sure no floater has focus after restoring them
}
// <FS:PP> FIRE-11312: Exiting Mouselook puts keyboard focus on Nearby Chat bar
else if(gSavedSettings.getBOOL("FSShowInterfaceInMouselook"))
{
gFocusMgr.setKeyboardFocus(NULL);
}
// </FS:PP>
gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR);

View File

@ -38,8 +38,9 @@
#include "llui.h"
#include "llviewercontrol.h"
#include "llweb.h"
#include "llviewernetwork.h"// </FS:AW opensim search support>
#include "llviewernetwork.h"// </FS:AW opensim search support>
#include "llviewerregion.h" // <FS:CR> Opensim search support
// support secondlife:///app/search/{CATEGORY}/{QUERY} SLapps
class LLSearchHandler : public LLCommandHandler
@ -223,9 +224,13 @@ void LLFloaterSearch::search(const SearchQuery &p)
}
else if(LLGridManager::getInstance()->isInOpenSim())
{
url = LLLoginInstance::getInstance()->hasResponse("search")
? LLLoginInstance::getInstance()->getResponse("search").asString()
: gSavedSettings.getString("SearchURLOpenSim");
std::string os_search_url = gAgent.getRegion()->getSearchServerURL();
if (!os_search_url.empty())
url = os_search_url;
else if (LLLoginInstance::getInstance()->hasResponse("search"))
url = LLLoginInstance::getInstance()->getResponse("search").asString();
else
url = gSavedSettings.getString("SearchURLOpenSim");
}
else // we are in SL or SL beta
#endif // OPENSIM // <FS:AW optional opensim support>

View File

@ -3903,14 +3903,14 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y
{
// We got an answer from the grid -> use that for map for the current session
gSavedSettings.setString("WebProfileURL", web_profile_url);
LL_INFOS("LLStartup") << "map-server-url : we got an answer from the grid : " << web_profile_url << LL_ENDL;
LL_INFOS("LLStartup") << "web-profile-url : we got an answer from the grid : " << web_profile_url << LL_ENDL;
}
else
{
// No answer from the grid -> use the default setting for current session
web_profile_url = "https://my.secondlife.com/[AGENT_NAME]";
gSavedSettings.setString("WebProfileURL", web_profile_url);
LL_INFOS("LLStartup") << "web_profile_url : no web_profile_url answer, we use the default setting for the web : " << web_profile_url << LL_ENDL;
LL_INFOS("LLStartup") << "web-profile-url : no web_profile_url answer, we use the default setting for the web : " << web_profile_url << LL_ENDL;
}
// <FS:CR> FIRE-10567 - Set classified fee, if it's available.
if (response.has("classified_fee"))

31
indra/newview/llurldispatcher.cpp Executable file → Normal file
View File

@ -210,22 +210,20 @@ bool LLURLDispatcherImpl::dispatchRegion(const LLSLURL& slurl, const std::string
// LLURLDispatcherImpl::regionNameCallback,
// slurl.getSLURLString(),
LLSLURL hyper = slurl;
std::string region = hyper.getRegion();
std::string dest = hyper.getSLURLString();
#ifdef OPENSIM // <FS:AW optional opensim support>
std::string grid = slurl.getGrid();
std::string current_grid = LLGridManager::getInstance()->getGrid();
std::string gatekeeper = LLGridManager::getInstance()->getGatekeeper(grid);
std::string current = LLGridManager::getInstance()->getGrid();
if((grid != current ) && (!LLGridManager::getInstance()->isInOpenSim() || (!slurl.getHypergrid() && gatekeeper.empty())))
if ((grid != current_grid)
&& (!LLGridManager::getInstance()->isInOpenSim() || (!slurl.getHypergrid() && gatekeeper.empty())))
{
std::string dest = hyper.getSLURLString();
if (!dest.empty())
{
LLSD args;
args["SLURL"] = dest;
args["GRID"] = slurl.getGrid();
args["GRID"] = grid;
args["CURRENT_GRID"] = current_grid;
LLNotificationsUtil::add("CantTeleportToGrid", args);
return true;
@ -235,28 +233,11 @@ bool LLURLDispatcherImpl::dispatchRegion(const LLSLURL& slurl, const std::string
{
hyper = LLSLURL(gatekeeper + ":" + slurl.getRegion(), slurl.getPosition(), true);
}
// Trim the grid uri if we're talking a local region here. <FS:CR>
if (grid == current)
{
std::size_t pos;
pos = region.find(current);
if (pos != std::string::npos)
{
region.erase(pos, pos + current.length() + 1);
}
pos = dest.find(current);
if (pos != std::string::npos)
{
dest.erase(pos, pos + current.length() + 1);
}
}
#endif //OPENSIM
// Request a region handle by name
LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region, LLURLDispatcherImpl::regionNameCallback, dest, LLUI::sSettingGroups["config"]->getBOOL("SLURLTeleportDirectly")); // don't teleport
// </FS:AW optional opensim support>
// Request a region handle by name
LLWorldMapMessage::getInstance()->sendNamedRegionRequest(hyper.getRegion(), LLURLDispatcherImpl::regionNameCallback, hyper.getSLURLString(), LLUI::sSettingGroups["config"]->getBOOL("SLURLTeleportDirectly")); // don't teleport
return true;
}

View File

@ -2062,7 +2062,28 @@ bool LLViewerRegion::dynamicPathfindingEnabled() const
}
// <FS:CR> OpenSim Extras support
#ifdef OPENSIM
LLViewerRegion::EOSExportSupport LLViewerRegion::regionSupportsExport() const
{
#ifndef OPENSIM
return EXPORT_UNDEFINED; // Second Life regions never support export.
}
#else // OPENSIM
EOSExportSupport export_support = EXPORT_UNDEFINED;
if ((mSimulatorFeatures.has("OpenSimExtras"))
&& (mSimulatorFeatures["OpenSimExtras"].has("ExportSupported")))
{
if (mSimulatorFeatures["OpenSimExtras"]["ExportSupported"].asBoolean())
{
export_support = EXPORT_ALLOWED;
}
else
{
export_support = EXPORT_DENIED;
}
}
return export_support;
}
// HG Maps
std::string LLViewerRegion::getHGMapServerURL() const
{
@ -2073,5 +2094,16 @@ std::string LLViewerRegion::getHGMapServerURL() const
}
return url;
}
#endif
// OS Search URL
std::string LLViewerRegion::getSearchServerURL() const
{
std::string url = "";
if (mSimulatorFeatures.has("OpenSimExtras") && mSimulatorFeatures["OpenSimExtras"].has("search-server-url"))
{
url = mSimulatorFeatures["OpenSimExtras"]["search-server-url"].asString();
}
return url;
}
#endif // OPENSIM
// </FS:CR>

View File

@ -319,8 +319,17 @@ public:
bool dynamicPathfindingEnabled() const;
// <FS:CR> Opensim Extras support
typedef enum e_os_export_support
{
EXPORT_UNDEFINED = 0,
EXPORT_ALLOWED,
EXPORT_DENIED
} EOSExportSupport;
EOSExportSupport regionSupportsExport() const; // ExportSupports
#ifdef OPENSIM
std::string getHGMapServerURL() const; // HG Maps
std::string getSearchServerURL() const; // OS Search URL
#endif // OPENSIM
// </FS:CR>

View File

@ -11429,5 +11429,13 @@ You are about to eject [COUNT] members from the group.
<tag>Export</tag>
Export finished and saved to [FILENAME].
</notification>
<notification
icon="notifytip.tga"
name="AntiSpamBlocked"
log_to_chat="false"
type="notifytip">
AntiSpam: Blocked ["SOURCE"] for spamming a ["QUEUE"] (["COUNT"]) times in [PERIOD] seconds.
</notification>
</notifications>

View File

@ -4473,4 +4473,7 @@ Nie można tego cofnąć.
<notification name="ExportFinished">
Wyeksportowano i zapisano do [FILENAME].
</notification>
<notification name="AntiSpamBlocked">
Antyspam: Zablokowano ["SOURCE"] ze względu na spam ["QUEUE"] (["COUNT"]) razy podczas [PERIOD] sekund.
</notification>
</notifications>

View File

@ -60,6 +60,7 @@ showUsage()
echo " --btype [Release|RelWithDebInfo] : Release is default, whether to use symbols"
echo " --kdu : Build with KDU"
echo " --package : Build installer"
echo " --no-package : Build without installer (Overrides --package)"
echo " --fmodex : Build with FMOD Ex"
echo " --opensim : Build with OpenSim support (Disables Havok features)"
echo " --no-opensim : Build without OpenSim support (Overrides --opensim)"
@ -75,7 +76,7 @@ getArgs()
# $* = the options passed in from main
{
if [ $# -gt 0 ]; then
while getoptex "clean build config version package fmodex jobs: platform: kdu opensim no-opensim avx help chan: btype:" "$@" ; do
while getoptex "clean build config version package no-package fmodex jobs: platform: kdu opensim no-opensim avx help chan: btype:" "$@" ; do
#insure options are valid
if [ -z "$OPTOPT" ] ; then
@ -98,6 +99,7 @@ getArgs()
no-opensim) WANTS_OPENSIM=$FALSE;;
avx) WANTS_AVX=$TRUE;;
package) WANTS_PACKAGE=$TRUE;;
no-package) WANTS_PACKAGE=$FALSE;;
build) WANTS_BUILD=$TRUE;;
platform) PLATFORM="$OPTARG";;
jobs) JOBS="$OPTARG";;