Get a buddy from the buddy list, using the buddy's username as key.
Refer to the buddyList property for a description of the buddy object's properties.
Refer to the buddyList property for a description of the buddy object's properties.


- buddyName (String)
- the username of the buddy.

The buddy object.

Since:
SmartFoxServer Pro v1.6.0
Version:
SmartFoxServer Pro

The following example shows how to retrieve a buddy from the buddy list.
CopyC#

Buddy buddy = smartFox.GetBuddyByName("jack"); 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));
