Removing true online status per Third Party Viewer Policy changes.

Fri, 24 Feb 2012 14:09:21 -0600

author
Tonya Souther <tonya.souther@gmail.com>
date
Fri, 24 Feb 2012 14:09:21 -0600
changeset 1602
08bf76c5d93b
parent 1601
ae290ae10ffe
child 1622
5ea066cea04d

Removing true online status per Third Party Viewer Policy changes.

indra/newview/app_settings/bridge_assets/3aa187cd-519e-ac01-04f1-09f8a89a8247.lsltext file | annotate | diff | revisions
indra/newview/llpanelavatar.cpp file | annotate | diff | revisions
indra/newview/llpanelavatar.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/app_settings/bridge_assets/3aa187cd-519e-ac01-04f1-09f8a89a8247.lsltext	Tue Feb 21 19:19:26 2012 -0800
     1.2 +++ b/indra/newview/app_settings/bridge_assets/3aa187cd-519e-ac01-04f1-09f8a89a8247.lsltext	Fri Feb 24 14:09:21 2012 -0600
     1.3 @@ -109,19 +109,10 @@
     1.4  	// The second token is the command itself.
     1.5  	string cmd = llList2String(instruction,1);
     1.6  
     1.7 -	// This checks the online status of an avatar. We request the status
     1.8 -	//  here; the result is returned to the viewer in the dataserver event
     1.9 -	//  handler.
    1.10 -	if (cmd == "online_status")
    1.11 -	{
    1.12 -		onlinereqs += [id, llRequestAgentData((key)llList2String(instruction,2), DATA_ONLINE)];
    1.13 -		debug("receive: Processing online request");
    1.14 -	}// End If
    1.15 -
    1.16  	// This retrieves the position of requested object(s) or avatar(s).
    1.17  	//  The command can request more than one position by simply listing
    1.18  	//  them, and we will return them in the same order.
    1.19 -	else if (cmd == "pos")
    1.20 +	if (cmd == "pos")
    1.21  	{
    1.22  		// Build the reply, starting with the requested UUID.
    1.23  		list positions = [id];
    1.24 @@ -279,23 +270,6 @@
    1.25  		}
    1.26  	} //End run time permissions
    1.27  
    1.28 -	// This event fires when the dataserver returns requested information.
    1.29 -	//  For this script, the only information requested is online status
    1.30 -	//  for avatars.
    1.31 -	dataserver(key id, string data)
    1.32 -	{
    1.33 -		// Are we checking status for the avatar we just got?
    1.34 -		integer i = llListFindList(onlinereqs,[id]);
    1.35 -		if(i != -1)
    1.36 -		{
    1.37 -			// If so, tell the viewer the status.
    1.38 -			debug("dataserver: Returning online status");
    1.39 -			send((string)llList2Integer(onlinereqs,i-1)+"|"+data);
    1.40 -			// Remove the avatar we just reported from the list.
    1.41 -			onlinereqs = llDeleteSubList(onlinereqs,i-1,i);
    1.42 -		}// End If
    1.43 -	} //End dataserver
    1.44 -
    1.45  	// This event fires when the timer has expired. For this script, that
    1.46  	//  happens during a teleport within the sim when the preference
    1.47  	//  "Use llMoveToTarget TP" is selected on the Phoenix/Misc panel. At
     2.1 --- a/indra/newview/llpanelavatar.cpp	Tue Feb 21 19:19:26 2012 -0800
     2.2 +++ b/indra/newview/llpanelavatar.cpp	Fri Feb 24 14:09:21 2012 -0600
     2.3 @@ -1471,62 +1471,15 @@
     2.4  }
     2.5  */
     2.6  
     2.7 -class JCProfileCallback : public JCBridgeCallback
     2.8 -{
     2.9 -public:
    2.10 -	JCProfileCallback(LLUUID avvie)
    2.11 -	{
    2.12 -		avatar = avvie;
    2.13 -	}
    2.14 -
    2.15 -	void fire(LLSD data)
    2.16 -	{
    2.17 -		//printchat("lol, \n"+std::string(LLSD::dumpXML(data)));
    2.18 -		//LLPanelAvatar
    2.19 -		for (std::list<LLPanelAvatar*>::iterator iter = LLPanelAvatar::sAllPanels.begin(); iter != LLPanelAvatar::sAllPanels.end(); ++iter)
    2.20 -		{
    2.21 -			LLPanelAvatar* panelp = *iter;
    2.22 -			if (panelp->mAvatarID == avatar)
    2.23 -			{
    2.24 -				BOOL status = atoi(data[0].asString().c_str());
    2.25 -
    2.26 -				panelp->childSetVisible("online_yes", TRUE);
    2.27 -				if(status)
    2.28 -				{
    2.29 -					panelp->childSetColor("online_yes",LLColor4::green);
    2.30 -					panelp->childSetValue("online_yes","Currently Online");
    2.31 -				}else
    2.32 -				{
    2.33 -					panelp->childSetColor("online_yes",LLColor4::red);
    2.34 -					panelp->childSetValue("online_yes","Currently Offline");
    2.35 -				}
    2.36 -			}
    2.37 -		}
    2.38 -		//printchat("lol, \n"+std::string(LLSD::dumpXML(data)));
    2.39 -	}
    2.40 -
    2.41 -private:
    2.42 -	LLUUID avatar;
    2.43 -};
    2.44 -
    2.45 -
    2.46  void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
    2.47  {
    2.48  	// Online status NO could be because they are hidden
    2.49  	// If they are a friend, we may know the truth!
    2.50 -		// Online status NO could be because they are hidden
    2.51 -	// If they are a friend, we may know the truth!
    2.52  	if (ONLINE_STATUS_YES != online_status)
    2.53  	{
    2.54  		if(mIsFriend && LLAvatarTracker::instance().isBuddyOnline(mAvatarID) )
    2.55  		{
    2.56  			online_status = ONLINE_STATUS_YES;
    2.57 -		}else
    2.58 -		{
    2.59 -			mPanelSecondLife->childSetVisible("online_yes", FALSE);
    2.60 -
    2.61 -			if(gSavedSettings.getBOOL("PhoenixUseBridgeOnline"))
    2.62 -				JCLSLBridge::instance().bridgetolsl("online_status|"+mAvatarID.asString(), new JCProfileCallback(mAvatarID));
    2.63  		}
    2.64  	}
    2.65  	if(online_status == ONLINE_STATUS_YES)
    2.66 @@ -1535,6 +1488,12 @@
    2.67  		mPanelSecondLife->childSetColor("online_yes",LLColor4::green);
    2.68  		mPanelSecondLife->childSetValue("online_yes","Currently Online");
    2.69  	}
    2.70 +	else
    2.71 +	{
    2.72 +		mPanelSecondLife->childSetVisible("online_yes", TRUE);
    2.73 +		mPanelSecondLife->childSetColor("online_yes",LLColor4::red);
    2.74 +		mPanelSecondLife->childSetValue("online_yes","Currently Offline");
    2.75 +	}
    2.76  
    2.77  	// Since setOnlineStatus gets called after setAvatarID
    2.78  	// need to make sure that "Offer Teleport" doesn't get set
     3.1 --- a/indra/newview/llpanelavatar.h	Tue Feb 21 19:19:26 2012 -0800
     3.2 +++ b/indra/newview/llpanelavatar.h	Fri Feb 24 14:09:21 2012 -0600
     3.3 @@ -278,7 +278,6 @@
     3.4  
     3.5  class LLPanelAvatar : public LLPanel
     3.6  {
     3.7 -	friend class JCProfileCallback;
     3.8  public:
     3.9  	LLPanelAvatar(const std::string& name, const LLRect &rect, BOOL allow_edit);
    3.10  	/*virtual*/ ~LLPanelAvatar();

mercurial