Privilege Manager Events

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

amateur
Posts: 29
Joined: 07 Jun 2017, 07:18

Privilege Manager Events

Postby amateur » 14 Jun 2020, 18:18

I set the default privilege to 1 when a registered user signs in, this might be increased to a 2 when joining a Room (by calling setPrivilegeId).

The change is reflected in SmartFox monitor on the server, but the client API doesn't know about it, and subsequent checks (e.g. IsModerator) don't know about the change.

Is there an event to listen for (or a way to refresh), so that I can update the UI in Unity when a user is given additional rights (or rights removed)?

Server version is 2.3.14.

Context (if it helps) is that different users have different rights in different rooms: they might moderate one room but not another.

Thanks
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Privilege Manager Events

Postby Lapo » 15 Jun 2020, 13:36

Hi,
the privilege ID is set a login time. The server sends the id back to the client in the login response. After that it doesn't change for the entirety of the session.

You can still change it on the server side via Extension code, but the client won't know unless you send them a custom update.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
amateur
Posts: 29
Joined: 07 Jun 2017, 07:18

Re: Privilege Manager Events

Postby amateur » 15 Jun 2020, 15:13

Amazing quick response thanks!

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 21 guests