setBuddyVariables()

Availability:

SmartFoxServer Basic / Pro (from version 1.4.0)

Usage:

smartFox.setBuddyVariables(varObj <proplist>)

Description:

Set a number of properties of a buddy. These variables will be received by the other users who have added this user as a buddy.
It can be used to store additional information for a buddy like the name of his/her avatar or his current status ("Available", "Busy" etc...)

Parameters:

varObj   an propertylist containing the variables to set

All variables should be of type String
Buddy variables are destroyed when the user logs out or gets disconnected.

Returns:

Fires the onBuddyListUpdate event

Example:

Example #1
we set two Buddy Variables to show the other clients our status and the current audio track we're listening to.

bVars=[#status:"Be right back", #track:"What is hip"]

smartFox.setBuddyVariables(bVars)


Buddy variables are broadcasted to all other clients that added our profile to their buddy list

See also:

onBuddyListUpdate