Events/role attribution

The role_attribution event allows for customizing which roles are assigned. It is not possible to directly assign a particular role to a particular player with this event.

Event callback
Do not modify any parameters to this event.
 * The default action is to merge the addroles dict with the default role listing for the gamemode. If the default is prevented, the gamemode roles are not used at all and all roles come from the addroles dict.
 * : The event object
 * : The IRC connection
 * : Function used to see if a particular role assignment would result in an instant game over, useful if randomizing roles
 * : Reference to the src.settings module
 * : List of players

Event data
By default, addroles is an empty dict. It is a mapping of role name to how many players to have in that role. If the default action is not prevented, this is merged with the role list for the gamemode.