User:Moonmoon/warnings

Notes on the upcoming warning system, for feedback purposes. Please leave feedback in the Feedback section below the explanation.

New features

 * The !fwarn command can be used by admins to view and manipulate warnings
 * A warning has a public reason (shown to the user) and private notes (only visible to admins). The reason is required when adding a warning, notes are not. Both reason and notes can be modified after the warning is issued.
 * A warning also has a number of warning points (0 or more) and an optional expiration date (if omitted, the warning expires after 30 days). Warning points cannot be modified after the warning is issued, while the expiration date can be modified. Warning points are used to automatically apply sanctions, and the expiration date allows for older warnings to expire.
 * The admin may require that the warning be acknowledged by the user before they are able to !join again. See the !warn command for more details.
 * The admin may manually specify one or more sanctions to apply to the warning. At the moment, the only sanctions available are "stasis" (gives user that number of games of stasis) and "deny" (which denies access to the listed commands).
 * Gameplay commands cannot be denied (such as see, kill, or !vote).
 * The !fwarn command has numerous subcommands: add, list, view, del, and set.
 * nick is a nickname of someone on the channel; if no such nick exists it is interpreted as an account name instead. No autocompletion is performed. Additionally, a hostmask can be specified in nick!user@host form or an account name can be explicitly specified by prefixing it with =, e.g. =account. This is useful in case you want to set a warning on an account and there is a nick with that account name already on the channel.
 * Specifying the @ before points means that the warning must be acknowledged by the user before they can use !join again.
 * points is a number 0 or above. Depending on the user's current points and this value, other sanctions may be automatically applied (see below).
 * If an expiry is given, it must be prefixed by ~ and suffixed by either d (days), h (hours), or m (minutes). For example, ~30d. An expiry of "~never" can be given to indicate it never expires. If nothing is specified, it will expire after 30 days.
 * Zero or more sanctions can be specified, each separated by a space. Current sanctions are  and  . No spaces can be present around the = sign or in command lists. Examples: stasis=2 or deny=start,goat
 * The reason is required and must be prefixed by a colon. It can be any freeform text, including spaces, but cannot contain pipes.
 * Notes are optional and are separated from the reason by a pipe. The pipe character cannot be escaped, so this means reasons cannot themselves contain this character (it would indicate the start of notes). Spaces around the pipe are optional, so both ":My reason here | my notes here" and ":My reason here|my notes here" are valid (as are any other spacing schemes)
 * If successful, you will be told the warning id of the added warning.
 * Lists warnings, limited to displaying 10 at once. If there are more than 10 warnings to list, the page parameter specifies what page to view.
 * nick is a nickname of someone on the channel; if no such nick exists it is interpreted as an account name instead. No autocompletion is performed. Additionally, a hostmask can be specified in nick!user@host form or an account name can be explicitly specified by prefixing it with =, e.g. =account.
 * If -all is not specified, only shows active warnings (most recent first). If specified, also shows expired and deleted warnings.
 * Views details on the specific warning id, such as the reason and notes, who gave it, and what sanctions it has.
 * Modifies the expiration date, reason and notes for the warning. No colon is required in front of the reason. If no notes are specified (e.g. there is no pipe character), the existing notes are unchanged. To remove the notes, specify a pipe character with nothing after it. If no reason is specified (e.g. the first character is a pipe character), the existing reason is unchanged. If no expiry is specified, the existing expiration date is unchanged. Specifying a date will calculate it from when the warning was originally given, and not the current time.
 * Deletes the warning, which will instantly reverse any deny sanctions applied to it. Stasis will not be removed, however that can be done via the !fstasis command. It is recommended to modify the warning notes to indicate why it is being deleted.
 * The !warn command also has various subcommands: list, view, and ack
 * Unlike !fwarn, !warn can only display warnings for the current user. It does not display certain information such as who gave the warning or the warning notes.
 * Displays all warnings for the current user (10 at a time). The page parameter can be used to show different sets of 10. They are sorted most recent first. If -all is specified, expired warnings are also shown, otherwise only active warnings are shown. Deleted warnings cannot be shown via this command.
 * Views info about the current warning, including points, expiration, reason, and sanctions. Who gave out the warning and warning notes are not displayed. The user can only use this command to view their own warnings, attempting to view someone else's warning will fail.
 * Acknowledges the given warning. The user can only use this command to acknowledge their own warnings, attempting to acknowledge someone else's warning will fail.
 * In addition to manually specified sanctions when adding a warning, certain sanctions my be automatically added when the user crosses certain warning point thresholds.
 * These thresholds form a range of min points to max points (inclusive). Crossing from below min points to min or above (even if it's above max) will apply the sanction. Additionally, moving entirely within the range will also apply the sanction.
 * Sanctions are merged together both from automatic sanctions and manually specified ones. For stasis, the larger stasis amount is applied (they are not added together). For denied commands, all denied commands are added together. If anything specifies that the warning requires acknowledgement, then it requires acknowledgement.
 * The current set of automatically applied sanctions are as follows:
 * 1-4 points: acknowledgement required
 * 5-9 points: 1 game of stasis
 * 10 points: acknowledgement required, 3 games of stasis
 * 11-14 points: 3 games of stasis
 * 15-24 points: 5-14 games of stasis (increases by 1 per each additional point)
 * Stasis now expires
 * The expiration is 1/hour, however it is applied in bulk (so 3 points of stasis will expire all at once in 3 hours, rather than 1 the first hour, 1 the second hour, and 1 the third)
 * Adding new stasis will increase the expiration time by a number of hours equal to the added amount
 * Stasis expiration is tracked separately from warning expiration. Expired warnings do not impact the amount of stasis one has, as the bot doesn't track which warning any particular game of stasis came from.
 * Stasis expiration happens whenever games are started or canceled or admin commands are run that modify the database. This means that the stasis expiration is more of a lower bound on when it will be removed rather than an exact time, as no timers are made for it. The !refreshdb command can be used in order to force-expire any expired stasis.
 * Instead of applying stasis on !quit or idling out, the bot will now apply 1-point warnings that expire after 30 days.
 * 11-14 points: 3 games of stasis
 * 15-24 points: 5-14 games of stasis (increases by 1 per each additional point)
 * Stasis now expires
 * The expiration is 1/hour, however it is applied in bulk (so 3 points of stasis will expire all at once in 3 hours, rather than 1 the first hour, 1 the second hour, and 1 the third)
 * Adding new stasis will increase the expiration time by a number of hours equal to the added amount
 * Stasis expiration is tracked separately from warning expiration. Expired warnings do not impact the amount of stasis one has, as the bot doesn't track which warning any particular game of stasis came from.
 * Stasis expiration happens whenever games are started or canceled or admin commands are run that modify the database. This means that the stasis expiration is more of a lower bound on when it will be removed rather than an exact time, as no timers are made for it. The !refreshdb command can be used in order to force-expire any expired stasis.
 * Instead of applying stasis on !quit or idling out, the bot will now apply 1-point warnings that expire after 30 days.

Changes to existing commands

 * The !fdeny command has been removed, replaced with "deny" sanctions.
 * The !fstasis command can now only reduce stasis (setting it to a lower number or 0), it cannot add new stasis. The "stasis" sanction can add new stasis.