Where do I find the buddylist data?

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
audi45
Posts: 4
Joined: 19 May 2020, 16:18

Where do I find the buddylist data?

Post by audi45 »

Hello,
i want to extract information about the friend list to use it elsewhere
What i want to know is the player's name and the names of the friends he added
I noticed that nothing happens in the buddyLists/ folder when I add and delete friends, so I don't think that the data is stored there
however in this file: datastore/__sfscore__.data I can see the database structure and data

Code: Select all

CREATE CACHED TABLE PUBLIC.BLIST_636F636F6C616E6933(
    OWNER VARCHAR(255) NOT NULL,
    NAMES_LIST LONGVARCHAR,
    BLOCK_LIST LONGVARCHAR,
    VAR_KEYS LONGVARCHAR,
    VAR_VALUES LONGVARCHAR
I noticed the -- H2 0.5/B -- is at the top of the file does that I can browse the data through h2 database
Alternatively, is it possible to fetch a particular player's friends list through extensions (JavaScript/ActionScript)?
Apologies, it's been quite a while since I last used SmartFox. And, thank you.
audi45
Posts: 4
Joined: 19 May 2020, 16:18

Re: Where do I find the buddylist data?

Post by audi45 »

Hello, any help please ?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Where do I find the buddylist data?

Post by Lapo »

Hi,
you can simply login as that user, load the buddy list and dump the data on the client side.

https://www.smartfoxserver.com/docs/1x/ ... /index.htm

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
audi45
Posts: 4
Joined: 19 May 2020, 16:18

Re: Where do I find the buddylist data?

Post by audi45 »

Sorry, I think I didn't explain properly
I need a way to access the user's buddylist on the server side
So that I can loop on all the users and save the data in another database that I will use elsewhere
In other words, I want to export the buddylist data stored in smartfox
But I didn't know how to reach the user's buddies using extensions
This is what I tried:

Code: Select all

var username = 'username' // this user have 20 buddies
var zone = 'zonename'
		
var data = Packages.it.gotoandplay.smartfoxserver.data.buddylist.StorableBuddyList(username)
var buddies = data.buddies
var owner = data.ownerName
trace(owner) // print username
trace(buddies) // print []
		
var data1 = Packages.it.gotoandplay.smartfoxserver.data.buddylist.BuddyListManager(zone, 999) 
var buddyList = data1.getBuddyList(username)
var buddyLists = data1.getBuddyLists()
trace(buddyList) // return null
trace(buddyLists) // return {}
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Where do I find the buddylist data?

Post by Lapo »

If you have a commercial license get in touch with us using our support@... email and we'll try to assist you.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply