Dispatched when the buddy list for the current user is received or a buddy is added/removed.


Version:
SmartFoxServer Basic / Pro

The following example shows how to retrieve the properties of each buddy when the buddy list is received.
CopyC#

SFSEvent.onBuddyList += OnBuddyList; smartFox.LoadBuddyList(); public void OnBuddyList(List<Buddy> buddyList) { foreach (Buddy buddy in buddyList) { Debug.WriteLine("Buddy id: " + buddy.GetId()); Debug.WriteLine("Buddy name: " + buddy.GetName()); Debug.WriteLine("Is buddy online? " + buddy.IsOnline()); Debug.WriteLine("Is buddy blocked? " + buddy.IsBlocked()); Debug.WriteLine("Buddy Variables:"); foreach (string v in buddy.GetVariables().Keys) Debug.WriteLine("\t" + v + " -- " + buddy.GetVariable{v}); } }
