Buddylists

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

Moderators: Lapo, Bax

TiagoR
Posts: 83
Joined: 15 Mar 2010, 11:42
Location: Portugal
Contact:

Buddylists

Postby TiagoR » 19 Oct 2010, 13:56

Hi,
im having a problem with buddy list, being the problem they're not being saved.
Isnt the buddylist meant to be persistent?

In my config.xml i got

Code: Select all

<Zone name="X" uCountUpdate="false" maxUsers="20" customLogin="true">
   <Room name="Map0" maxUsers="50" isPrivate="false" isTemp="false">
(...)
       <Vars>
     <Var name="_os_mapId" type="s" private="false">Y#Map0</Var>
    </Vars>
       </Room>

<BuddyList active="true">
   <size>20</size>
   <maxBuddyVariables>5</maxBuddyVariables>
   <mode>advanced</mode>
            <offLineBuddyVariables>true</offLineBuddyVariables>
   <permissionTimeOut>60</permissionTimeOut>
   <mutualAddBuddy>true</mutualAddBuddy>
               <mutualRemoveBuddy>true</mutualRemoveBuddy>
   <ownerListFullErrorMsg>Buddy list full message!</ownerListFullErrorMsg>
   <targetListFullErrorMsg>Target buddy list full message!</targetListFullErrorMsg>
</BuddyList>
(...)
</Zone>


On server init:

Code: Select all

16:08:33.590 - [ FINE ] > AdvancedBuddyListPersister <INIT>
Zone: X


An example from server output:

Code: Select all

16:13:29.140 - [ INFO ] > Asking buddy permission. Sender: R, Target:it.gotoandplay.smartfoxserver.data.User@4800ef96
16:13:42.430 - [ FINE ] > Added buddy { T } for user: { R }
16:13:42.434 - [ FINE ] > Added buddy { R } for user: { T }
16:13:48.771 - [ FINER ] > Buddy list stored: UPDATE BLIST_4369646164654573636F6
C61 SET NAMES_LIST='R',BLOCK_LIST='0',VAR_KEYS='',VAR_VALUES='' WHERE OWNER='T'
16:13:48.774 - [ FINER ] > Buddy list stored: UPDATE BLIST_4369646164654573636F6
C61 SET NAMES_LIST='T',BLOCK_LIST='0',VAR_KEYS='',VAR_VALUES='' WHERE OWNER='R'
16:13:48.775 - [ FINE ] > Buddy Lists Autosave done in 9ms.


Ingame they seem to work fine, but after a user lefts his buddy list is lost.
TR
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 19 Oct 2010, 18:49

Yes,
buddy list are persistent by default, there's nothing special to do. All the examples we provide (see AdvancedBuddyList for AS2 or AS3) work with persistence out of the box.
I would suggest to take a closer look at those examples and study how they work. It's really that simple.

Unless... there's some server side error that clearly indicates a failure in saving the buddy list data. A peek at the logs should reveal that very quickly.

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
TiagoR
Posts: 83
Joined: 15 Mar 2010, 11:42
Location: Portugal
Contact:

Postby TiagoR » 20 Oct 2010, 15:25

Well I continued programming other areas, and somehow it seems to work now. Just hope it isnt temporary. :roll:
But it is odd since I haven't changed any config or server code, and haven't touched the buddy list code.
TR
TiagoR
Posts: 83
Joined: 15 Mar 2010, 11:42
Location: Portugal
Contact:

Postby TiagoR » 22 Oct 2010, 13:42

Hi Lapo.
Again with the same problem, after all it wasnt magically fixed :cry: It seems that i had the luck to be testing with the only player that would keep a buddylist! All other players i tested only keep the buddy list for the session.

Do you have a clue why only one player ( in 3 that I'm using for tests) is saving his buddylist, while all others don't? Cause I'm clueless..

EDIT:
I receive the buddylist right on user A, but on user B I receive a empty buddylist but when I send a private message from user A to B server says

Code: Select all

16:20:39.528 - [ FINE ] > recipientIsNotBlockedInSenderBuddyList: true
16:20:39.529 - [ FINE ] > senderIsNotBlockedInRecipientBuddyList: true
16:20:39.529 - [ FINE ] > mutualBuddiesActiveAndBothBuddiesValid: true


that they are mutual friends !
I created a update list button to see if it was a sync problem, but its not :(

And the Server/buddyLists/ is empty.. :shock:
TR
TiagoR
Posts: 83
Joined: 15 Mar 2010, 11:42
Location: Portugal
Contact:

Postby TiagoR » 26 Oct 2010, 07:27

Any help?
TR

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 53 guests