Admin commands

These are commands that require elevated access in order to execute (either by being owner, full admin, or having the relevant flag for the command). Some commands only work in debug mode by default but can be enabled for normal mode by editing ALLOWED_NORMAL_MODE_COMMANDS in your botconfig.py. Parameters wrapped in angle brackets <like so> are required. Parameters wrapped in square brackets [like so] are optional. A pipe character | indicates multiple valid options. The prefix ! is used here, as it is the default, but it will obviously be whatever prefix you set for your instance.

These commands require either admin or owner access in botconfig.py or can be given to the user via !fflags. The relevant flag for each command is listed in the heading, alternatively admins (those with the +F flag) can run every admin command.

Causes the given !command to be executed after the current game is finished. You must still have permission to execute whatever command that is. Only one faftergame command will apply, future uses on the same game will overwrite what was previously set. (Note: this is due to how this command works internally, and may change eventually.)

Causes the bot to /QUIT IRC and then shut down (terminating the bot's process). If used during a game, -force must be used to prevent an accidental shutdown. If a reason is specified, it will be included in the quit message. If -dirty is specified, forces the bot to shut down immediately (it does not try to terminate the game in progress or anything else). This is useful if the regular shutdown sequence is reporting errors. Executing this at the same time as a write operation to the filesystem or database will abort that operation at whatever its current state is, potentially leaving things in a corrupted state which requires manual cleanup; as such, frequent backups as well as only using the flag as a last resort is advisable.

Views or modifies flags for a user. If no parameters are given, lists every access entry. If only a user is given, lists that user's access (access given from botconfig.py, e.g. the OWNERS list, is not shown). If both a user and flags are given, modifies the user's access according to the given flags. This can either add new flags (if the flags are prefixed with +) or remove them (if prefixed with -). The special flag '*' can be used to add every flag except +F or remove every flag including +F. A template name can be given for flags to make the user inherit flags from the template (if the template is changed or removed, the user's access is changed or removed automatically).

Forces the gamemode to be selected and disables voting on game modes by players. In addition to regular modes, the special roles mode is available which can be used to set arbitrary roles. The syntax for the roles mode looks like so: !fgame roles=<role>:<number>[,<role>:<number>...][,default:villager|cultist][,role reveal:on|off]. Example: !fgame roles=wolf:2,guardian angel:1,seer:1.

This command is only enabled for debug mode unless it is added to ALLOWED_NORMAL_MODE_COMMANDS in botconfig.py.

Causes a goat to wander by and violently kick or headbutt the phrase passed in. This gets around any restrictions on !goat in that it can be used an unlimited number of times at any point (not just during day).

Causes the bot to treat every nick in the list of parameters as if they executed a !join command. If any given nick has 1 game of stasis, the stasis will be removed and they will join. If any given nick has more than 1 game of stasis, they will not be joined by this command -- the stasis will need to be removed with !fstasis first.

If debug mode is enabled, fake nicks can be joined this way. A fake nick is a nickname that contains only numbers.

Disables starting new games, and optionally runs command after the current game is complete as if you executed !faftergame command. The bot must be restarted (via !frestart, the command line, killing and restarting the process or similar) before new games may commence.

Forces the chosen nick to execute the given command. A special nick of * will force everyone currently playing to execute the command. The command may not be an admin command unless the person using !force is an actual admin. Owner-only commands may never be forced. This command must be used in-channel, it cannot be used in pm.

This command is only enabled for debug mode unless it is added to ALLOWED_NORMAL_MODE_COMMANDS in botconfig.py.

Causes the bot to update its source code using git. Assuming you set up the bot by cloning the lykos repository here, this will cause you to get the latest version of the source. You can use !update or !aftergame update (see below) to automatically restart the bot after pulling.

Updates tracking variables with the contents of the database. This can be used to re-check stasis expiration, and is also useful if one modified the database via a manual SQL query and wants to reload that updated information into the bot.

Causes the bot to /QUIT and then restart (forking off to a new process). This will make it pick up on any code changes that were made to the bot's code, such as changes obtained from editing botconfig.py or executing !pull. If used during a game, -force must be used to prevent an accidental restart. If a reason is specified, it will be included in the quit message. If any players are currently joined, they will be highlighted by the bot after it rejoins the channel.

Reveals all information about the game in progress, including who has what role and role-specific information such as who has which totems, who assassins are targeting, etc. If in debug mode, this has no restrictions on use and can be used in-channel. If in normal mode, this command may only be used by dead or unjoined players and will always respond in PM. Active vengeful ghosts are not counted as "dead" for the purpose of using this command.

This command is only enabled for debug mode unless it is added to ALLOWED_NORMAL_MODE_COMMANDS in botconfig.py.

Forces everyone that is the chosen role to execute the given command. A special role of * will force everyone currently playing to execute the command. The command may not be an admin command unless the person using !rforce is an actual admin. Owner-only commands may never be forced. This command must be used in-channel, it cannot be used in pm.

This command is only enabled for debug mode unless it is added to ALLOWED_NORMAL_MODE_COMMANDS in botconfig.py.

Changes the nick's role to role or adds/removes a template from nick. If used on someone not currently playing, causes them to join the game on a player and then sets their role accordingly. Certain roles and templates can take a parameter. For example, you can specify what totem a shaman has by !frole nick shaman=totem or how many bullets a gunner has by !frole nick +gunner=number.

This command is only enabled for debug mode unless it is added to ALLOWED_NORMAL_MODE_COMMANDS in botconfig.py.

Lets you spectate wolfchat or deadchat, or removes you from spectating such. You will be relayed everything that is said in that chat. If in debug mode, this has no restrictions on use and can be used in-channel. If in normal mode, this command may only be used by dead or unjoined players and will always respond in PM. Active vengeful ghosts are not counted as "dead" for the purpose of using this command.

The !spectate command requires +p, only works on wolfchat, and users in the chat are alerted that someone is spectating. The !fspectate command requires +F, works on wolfchat and deadchat, and users in the chat are not alerted that anyone is spectating.

Gets or sets the reduces on someone. If used without an amount, shows how much stasis is currently on the specified nick, account, or host. If used with an amount, sets the stasis for that nick, account, or host to the specified amount. Stasis prevents that person from !joining that number of games, and is reduced by 1 each time a game is started. To remove stasis from someone entirely, set the amount to 0. By default, this command can only be used to reduce or remove stasis from someone, it cannot be used to add stasis; to change this behavior set RESTRICT_FSTASIS = False in your botconfig.py. See !fwarn add for information on adding stasis. Reducing stasis amounts via !fstasis does not reduce when the stasis would normally expire, however adding stasis (when the command is unrestricted) adjusts the expiration.

Forces the bot to sync up channel modes with what it currently expects, useful if a game is running during netsplits and the servers mess up the modes. It will cause the bot to voice all alive players, devoice everyone else, and set +m if a game is running or -m if a game is not running.

Views or modifies templates, which are collections of flags under a friendly name. If no parameters are given, a list of templates is shown. If parameters are given, modifies the given template to the given flags. Flags can either be another template name (in which case flags are inherited from that template), or a list of flags prefixed with + to add or - to remove. The flag '*' can be given to add every flag except +F, or remove every flag including +F. Modifying templates will also modify any users whose access was set to the template.

Adds a warning to the given user. The user can either be a nick on the channel, a hostmask in the form of nick!user@host, or an explicit account name by prefixing it with = (e.g. =account). Most parameters are optional and can be safely omitted, as the automatic sanction system generally suffices. However, they are made available to specify manually should the need arise. The warning points is a number of warning points to add. The reason may be prefixed with a colon, but this is not required unless the first word of the reason is also a valid sanction ("stasis", "deny", or "tempban"). An expiration time can be specified (such as ~7d or ~never), and if left out the default expiration time of 30 days is used. Valid suffixes for the expiration time are "d" for days, "m" for minutes, and "h" for hours. Alternatively, "never" can be specified to make the warning never expire. The sanctions list can be used to give the user stasis, deny access to commands, or ban the user. A stasis sanction should be specified as stasis=number, denying commands is deny=command1,command2,... (no spaces are allowed in the command list or around the equals sign), and bans are tempban=expires (expires either being a time formatted the same as the warning expiration time with exception that "never" is not a valid option, or a plain number in which case the ban expires once enough warnings expire on that user to bring them at or below that number of points). The reason is displayed to the user receiving the warning, whereas the notes are only viewable by other admins. Notes are separated from the reason with a pipe character; this also means that a pipe character cannot be present in a reason (it cannot be escaped).

Deletes the warning with the given id. At this time, warnings cannot be undeleted. You should probably modify the notes via !fwarn set to indicate why you are deleting the warning. Users cannot view deleted warnings, only admins can.

Modifies the expiration date, reason, or notes for the warning. If any parameter is not specified, it will be left unchanged. To clear the notes, specify a pipe character with nothing after it. Any expiration time is calculated from the time the warning was originally issued.

Examples:

Modify expiration time and update notes while leaving reason the same:
!fwarn set 5 ~60d | Continued harassment
Clear the notes
!fwarn set 5 |

Displays a list of warnings. If -all is not specified, only active (not expired or deleted) warnings are shown. If -all is specified, expired and deleted warnings are additionally shown. If user is not specified, shows all warnings or otherwise only shows warnings for the user. The user can either be a nickname of someone on the channel, a hostmask in nick!user@host form, or an account name prefixed with =, e.g. =account. 10 warnings are shown at a time, to view more the page parameter can be used to view other pages of warnings. Warnings are listed most recent first.

Evaluates expression as a Python expression and prints the result. Warning: This is dangerous and has the potential to do a lot of harm! You will often not need this, as this is used mainly for testing and debugging.

This command is only enabled for debug mode and cannot be enabled for normal mode.