Events/join

The join event is called in the !join and !fjoin commands, and is fired before the bot processes the join. The event can control the flow from the join functions, and can bypass the regular join logic with custom logic.

Event callback

 * Default action is to join the user(s) to the game if the command was executed in the main channel and no game is running, otherwise will join the user(s) to deadchat if the command is executed while a game is running. The default action can be prevented so that no built-in join logic is run. In this case, it is the responsibility of the callback to perform all necessary logic.
 * : The event object
 * : The IRC instance
 * : Reference to the src.settings module
 * : Nick that executed the !join or !fjoin. Note: in !fjoin, the nicks to join are in, nick itself is not joined
 * : Channel the command was executed in
 * : Parameters given to the command as a single string. In !join, this may be the gamemode to vote for. In !fjoin, this is the list of players to join.
 * : True if this is an !fjoin, False if this is a regular !join.

Event data
The event data is initialized to the functions, , and in wolfgame.py, respectively. These can be called in order to make use of the bot's default logic when preventing the default logic in the join command itself, or can be overridden with custom functions so that the default join logic calls the event's functions instead of the built-in ones. The function should return True if the player was successfully joined, and False otherwise. Its sanity keyword argument is a special case for the maelstrom game mode which if False bypasses checks that prevent players from joining mid-game. If you wish to set this to False, you are responsible for assigning that player to a role; see the maelstrom code for an example of how to do this.