How to get the following in the server side sfs2x:
1. the buddylist limit (as defined in the zone config)
2. the current buddies size (how many buddies are saved) in a user`s buddylist
how to get buddylist limit in serverside?
Re: how to get buddylist limit in serverside?
1) <YourZoneObj>.getBuddyListManager().getBuddyListMaxSize()
2) <YourBuddyObj>.getBuddyList().getSize()
Check the server-side documentation for further details on these classes:
SFSBuddyListManager, manages the buddy lists
SFSBuddyManager, manages the single buddy list
http://docs2x.smartfoxserver.com/api-do ... oc/server/
2) <YourBuddyObj>.getBuddyList().getSize()
Check the server-side documentation for further details on these classes:
SFSBuddyListManager, manages the buddy lists
SFSBuddyManager, manages the single buddy list
http://docs2x.smartfoxserver.com/api-do ... oc/server/
Re: how to get buddylist limit in serverside?
2) <YourBuddyObj>.getBuddyList().getSize()
Anyway I can use the ".getBuddyList().getSize()" with User insread of Buddy? If not, is there anyway to convert from User to Buddy?
Re: how to get buddylist limit in serverside?
No, you can't there's no such thing on the User object.
You can't convert User to Buddy because they are two completely different classes. But you can get the Buddy object related to the User via the username.
If your user is called "Animal" you can use BuddyListManager.getBuddyList( userName )
You can't convert User to Buddy because they are two completely different classes. But you can get the Buddy object related to the User via the username.
If your user is called "Animal" you can use BuddyListManager.getBuddyList( userName )
Re: how to get buddylist limit in serverside?
Lapo wrote:But you can get the Buddy object related to the User via the username.
If your user is called "Animal" you can use BuddyListManager.getBuddyList( userName )
This does the trick. thanks.
Who is online
Users browsing this forum: No registered users and 132 guests