Remove Offline Buddy

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

ersindemir
Posts: 30
Joined: 30 Apr 2016, 07:23
Location: Turkey

Remove Offline Buddy

Postby ersindemir » 25 Jul 2017, 11:53

How can I remove buddy if he is offline?

public void removeBuddy(Zone zone,java.lang.String ownerName,java.lang.String buddyName,boolean fireClientEvent,boolean fireServerEvent)

Function is exist but description of this function is "Removes a Buddy from the owner's BuddyList even if the User is not online at the moment This feature is not implemented yet."

I found 2 posts which they are send 2 years ago. Has any solution yet ?

Smartfox v. : 2.12.0
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Remove Offline Buddy

Postby Lapo » 25 Jul 2017, 13:40

{{ This topic has been moved in the SFS2X section }}

Hi,
what you have read is still valid. Typically it's the User who changes his/her buddy list and in order to do that he must be connected, so 99% of the times this is not a problem.

When a User is not online his buddy list is data is not kept in the server's memory (otherwise it would require too much RAM), therefore the only way to manipulate a BuddyList when it's owner is offline is to directly alter the stored buddy list data.

Typically this works best with a custom BuddyList persistence system:
http://docs2x.smartfoxserver.com/Advanc ... y-list-api

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 39 guests