User clans module.

BETA: This module and all underlying classes are currently in beta.

Constructor

Methods

createClan (leaderID:Int, name:String, note:String, attrs:Dynamic):{id:Int, errorCode:String}

Creates a new clan and returns its ID.

Parameters:

leaderID

Clan leader ID.

name

Clan name.

note

Clan note.

attrs

Additional clan attributes. "Clans" database table has to have fields for these attributes.

Returns:

Operation error code and new clan ID if the operation was successful. ok - operation successful. nameExists - clan with this name exists. leaderExists - clan with this leader ID exists.

deleteClan (clanID:Int):String

Deletes a clan.

Parameters:

clanID

Clan ID.

Returns:

Operation error code. ok - operation successful.

getClan (clanID:Int):ClanCore

Returns a clan data instance. Any changes in that instance will be sent over to cache server immediately. Note that its contents are not synchronized automatically with instances on other servers.

Parameters:

clanID

Clan ID.

Returns:

Clan instance. Returns null if the clan does not exist.