Admin commands

From Werewolf Wiki
Jump to navigation Jump to search

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 (those with the flag +d). 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.

Admin commands

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.

!aftergame <command> [parameters] (+D)

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.)

Aliases: !faftergame

!fday (+N)

Forces the night to end immediately. Any night commands that were given before !fday was used still take effect (such as killing, giving out totems, etc.).

!fdie [-force|-dirty] [reason] (+F)

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.

Aliases: !fbye

!fdo <target> <message> (+s)

Causes the bot to action message to target (a la /me). If used by a non-admin, the only allowed target is the main channel, otherwise can be used to target anything.

Aliases: !fme

!fflags [user] [flags] (+F)

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).

Examples:

Give +j to lykos:
!fflags lykos +j

Give +as to lykos as well (making total access +ajs):
!fflags lykos +as

Set example's access to templatename (any existing flags not in templatename are removed):
!fflags example templatename

Remove example's access:
!fflags example -*

!fgame <gamemode> (+g)

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.

!fgoat <phrase> (+j)

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).

!fjoin <nick1> [nick2...] (+A)

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.

!lastgame [command] (+D)

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.

Aliases: !flastgame

!fleave <nick1> [nick2...] (+A)

Causes the bot to treat every nick in the list of parameters as if they executed a !leave command. This will not cause the effected nicks to get stasis, even if a game is currently running.

Aliases: !fquit

!fnight (+N)

Forces the day to end immediately as if it had reached its maximum time. If any votes are currently in place, they will be counted for a lynch (with nobody being lynched on a tie).

!force <nick> <command> (+d)

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.

!pull (+D)

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.

Aliases: !fpull

!refreshdb (+m)

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.

!restart [-force] [reason] (+D)

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.

Aliases: !frestart

!revealroles (+a)

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.

!rforce <role> <command> (+d)

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.

!frole <nick> <role|+template|-template>[=<param>] (+d)

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.

!fsay <target> <message> (+s)

Causes the bot to say message to target. If used by a non-admin, the only allowed target is the main channel, otherwise can be used to target anything.

!fsend <command> (+F)

Causes the bot to send any arbitrary raw IRC command to the server. This must follow all IRC specifications, for example !fsend PRIVMSG #channel :This is my message I want to send.

!spectate <wolfchat|deadchat> [on|off] (+p)

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.

Aliases: !fspectate

!fstart (+S)

Forces the game to start, ignoring any wait time that is currently in effect. All other conditions for starting (e.g. maximum and minimum players) must still be met.

!fstasis <nick|account|host> [amount] (+A)

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.

!fstop (+S)

Stops any game currently in progress. The game will not count towards any statistics.

!sync (+m)

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.

Aliases: !fsync

!template [<template> <flags>] (+F)

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.

Examples:

Create a new template "op" and set its flags:
!ftemplate op +AaDjms

Remove the "D" flag from op, leaving +Aajms:
!ftemplate op -D

Create a new template "admin" that copies flags from op:
!ftemplate admin op

Set admin +F and remove all other flags:
!ftemplate admin -*+F

Delete template op:
!ftemplate op -*

!update (+D)

This command combines !pull and !restart in one command. If a game is running, you must either use !aftergame update or !update -force.

!fwait <time> (+w)

Adds or removes a number of seconds from the wait time.

!fwarn add [-account] <nick> <points> [-expires expiry] [-stasis stasis] [-deny command]... [-ban duration (+F)

Adds a warning to the given user. The user can either be a nick on the channel, or an explicit account name by specifying -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. An expiration time can be specified with -expires (such as -expires 7d or -expires 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. -stasis can be used to give the user an explicit number of games of stasis, rather than using the standard warning track. -deny can be used to deny access to a specific non-gameplay command. Multiple -deny can be given in one warning. -ban can be used to explicitly add a ban to a warning. It will expire after the specified duration with the same syntax as -expires (besides the fact "never" is not a valid option). Or, with no suffix, it will expire once enough warnings expire 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 the -notes argument.

Examples:

Basic usage:
!fwarn add lykos 1 Being rude

Admin notes:
!fwarn add lykos 1 Being rude -notes See channel log for 2016-06-21 at 13:13 UTC

Modifying expiration:
!fwarn add lykos 1 -expires 90d Being rude

Sanctions:
!fwarn add lykos 1 -stasis 3 -deny goat Abusing !goat

!fwarn del <id> (+F)

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.

!fwarn set <id> [-expires expiry] [-reason reason] [-notes notes] (+F)

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 -notes 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 -notes Continued harassment

Clear the notes
!fwarn set 5 -notes

!fwarn list [-all] [-account] <nick|*> [page] (+F)

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.

!fwarn view <id> (+F)

Views details about the given warning.

Owner-only commands

These commands require owner access in botconfig.py.

!eval <expression>

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.

!exec <code>

Executes arbitrary Python code. 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.

Commands by flag

+D

  • aftergame
  • lastgame
  • restart
  • update

+N

  • fday
  • fnight

+F

  • fdie
  • fflags
  • fsend
  • template
  • fwarm

+s

  • fdo
  • fsay

+S

  • fstart
  • fstop

+g

  • fgame

+j

  • fgoat

+A

  • fjoin
  • fleave
  • fstasis

+d

  • force
  • rforce
  • frole

+a

  • revealroles

+p

  • spectate

+m

  • sync
  • refreshdb

+w

  • fwait