Murmur::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 support fall through, meaning murmur should continue the operation against its
own database.
Operation Index
- registerUser
-
Register a new user.
- unregisterUser
-
Unregister a user.
- getRegisteredUsers
-
Get a list of registered users matching filter.
- setInfo
-
Set additional information for user registration.
- setTexture
-
Set texture of user registration.
Operations
int registerUser(UserInfoMap info)
Register a new user.
Parameters
- info
-
Information about user to register.
Return Value
User id of new user, -1 for registration failure, or -2 to fall through.
int unregisterUser(int id)
Unregister a user.
Parameters
- id
-
Userid to unregister.
Return Value
1 for successfull unregistration, 0 for unsuccessfull unregistration, -1 to fall through.
NameMap getRegisteredUsers(string filter)
Get a list of registered users matching filter.
Parameters
- filter
-
Substring usernames must contain. If empty, return all registered users.
Return Value
List of matching registered users.
int setInfo(int id, UserInfoMap info)
Set additional information for user registration.
Parameters
- id
-
Userid of registered user.
- info
-
Information to set about user. This should be merged with existing information.
Return Value
1 for successfull update, 0 for unsuccessfull update, -1 to fall through.
int setTexture(int id, Texture tex)
Set texture of user registration.
Parameters
- id
-
Userid of registered user.
- tex
-
New texture.
Return Value
1 for successfull update, 0 for unsuccessfull update, -1 to fall through.