Home Previous Up Next Index

ServerUpdatingAuthenticator

Overview

interface ServerUpdatingAuthenticator extends ServerAuthenticator

Callback interface for server authentication and registration. This allows you to support both authentication and account updating. You do not need to implement this if all you want is authentication, you only need this if other scripts connected to the same server calls e.g. Server::setTexture. Almost all of these methods all fall through, meaning murmur should continue the operation against its own database.

Operation Index

registerPlayer
Register a new player.
unregisterPlayer
Unregister a player.
getRegisteredPlayers
Get a list of registered players matching filter.
getRegistration
Get single player registration.
setPassword
Set password of player registration.
setEmail
Set Email address of player registration.
setName
Set playername of player registration.
setTexture
Set texture of player registration.

Operations

int registerPlayer(string name)

Register a new player.

Parameters

name
Playername to register.

Return Value

Player id of new player, -1 for registration failure, or -2 to fall through.

int unregisterPlayer(int id)

Unregister a player.

Parameters

id
Playerid to unregister.

Return Value

1 for successfull unregistration, 0 for unsuccessfull unregistration, -1 to fall through.

RegisteredPlayerList getRegisteredPlayers(string filter)

Get a list of registered players matching filter.

Parameters

filter
Substring playernames must contain. If empty, return all registered players.

Return Value

List of matching registered players.

int getRegistration(int id, out string name, out string email)

Get single player registration.

Parameters

id
Playerid of registered player.
name
Name of registered player.
email
Email address of registered player.

Return Value

1 for successfull fetch, 0 for unsuccessfull fetch, -1 to fall through.

int setPassword(int id, string pw)

Set password of player registration.

Parameters

id
Playerid of registered player.
pw
New password.

Return Value

1 for successfull update, 0 for unsuccessfull update, -1 to fall through.

int setEmail(int id, string email)

Set Email address of player registration.

Parameters

id
Playerid of registered player.
pw
email New Email address.

Return Value

1 for successfull update, 0 for unsuccessfull update, -1 to fall through.

int setName(int id, string name)

Set playername of player registration.

Parameters

id
Playerid of registered player.
name
New Playername.

Return Value

1 for successfull update, 0 for unsuccessfull update, -1 to fall through.

int setTexture(int id, Texture tex)

Set texture of player registration.

Parameters

id
Playerid of registered player.
tex
New texture.

Return Value

1 for successfull update, 0 for unsuccessfull update, -1 to fall through.


Home Previous Up Next Index