Events/player win

The player_win event is called once per player in the game that did not disconnect (idle/quit), and is used to determine whether they had a team and/or individual win. Additional metadata may be attached to the player record which will show up in that player's game stats; this is used to mark lovers for example.

Event callback

 * prevent_default has no effect in this event
 * : The event object
 * : The IRC connection
 * : Reference to the src.settings module
 * : Player whose win status is being checked
 * : The player's final role
 * : The listed winner for the game, values include villagers, wolves, monsters, or @ followed by a player's nickname for a fool win.
 * : True if the player was alive at the end of the game

Event data
Modify won and iwon appropriately to set a team or individual win for the player. It is initialized based on the winning team and whether the player's role was wolf-aligned, true neutral, or neither. Strings may be added to the special list to tag the player with additional metadata to be recorded in the database for that game.