Skip to content

Commit

Permalink
Merge the 'example_commands' section into the main 'commands' section
Browse files Browse the repository at this point in the history
This allows to programmatically know which example demonstrates each command,
which will be used to generate HELPOP files (GH-107)
  • Loading branch information
progval authored and SadieCat committed Nov 20, 2021
1 parent 56ad1cc commit 4e413e5
Show file tree
Hide file tree
Showing 51 changed files with 518 additions and 552 deletions.
19 changes: 9 additions & 10 deletions docs/3/modules/callerid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,15 @@ commands:
syntax: '`*`<br>`(+|-)<nickname>[,(+|-)<nickname>]+`'
description: |-
Allows users to add, remove, and view the users on their callerid whitelist.
example: |-
Lists all users on your callerid whitelist:
example_commands: |-
Lists all users on your callerid whitelist:
```plaintext
/ACCEPT *
```
```plaintext
/ACCEPT *
```
Adds Sadie to your callerid whitelist and removes Adam from your callerid whitelist:
Adds Sadie to your callerid whitelist and removes Adam from your callerid whitelist:
```plaintext
/ACCEPT +Sadie,-Adam
```
```plaintext
/ACCEPT +Sadie,-Adam
```
27 changes: 13 additions & 14 deletions docs/3/modules/cban.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,24 @@ commands:
syntax: '`<channel> [<duration> [<reason>]]`'
description: |-
Allows server operators to add and remove channel bans.
example: |-
Bans the #example channel for one week:
example_commands: |-
Bans the #example channel for one week:
```plaintext
/CBAN #example 7d :This channel is banned for a week
```
```plaintext
/CBAN #example 7d :This channel is banned for a week
```
Bans channels that match the glob #example* forever:
Bans channels that match the glob #example* forever:
```plaintext
/CBAN #example* 0 :This channel is banned forever
```
```plaintext
/CBAN #example* 0 :This channel is banned forever
```
Unbans the #example channel:
Unbans the #example channel:
```plaintext
/CBAN #example
```
```plaintext
/CBAN #example
```
stats:
- char: C
Expand Down
25 changes: 12 additions & 13 deletions docs/3/modules/cgiirc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ commands:
added: 3.9.0
description: |-
Encodes or decodes an IP between its human readable form and its hex form.
example: |-
Decodes 7f000001 to its human readable form:
```plaintext
/HEXIP 7f000001
```
Encodes 127.0.0.1 to its hex form:
```plaintext
/HEXIP 127.0.0.1
```
- name: WEBIRC
param_count: 4-5
syntax: '`<password> <gateway> <hostname> <address> [<flags>]`'
Expand All @@ -137,19 +149,6 @@ command_details: |-
# WEBIRC is not documented here because it is not intended to be executed by users

example_commands: |-
Decodes 7f000001 to its human readable form:
```plaintext
/HEXIP 7f000001
```
Encodes 127.0.0.1 to its hex form:
```plaintext
/HEXIP 127.0.0.1
```
extbans:
chars:
- name: gateway
Expand Down
19 changes: 9 additions & 10 deletions docs/3/modules/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ commands:
`<channel> [<server>]`<br>`<nickname> [<server>]`<br>`<ip> [<server>]`<br>`<hostname> [<server>]`
description: |-
Looks up information about the specified channel, user, IP address, or hostname.
example: |-
Looks up details relating to #channel:
example_commands: |-
Looks up details relating to #channel:
```plaintext
/CHECK #example
```
```plaintext
/CHECK #example
```
Looks up details relating to Sadie on irc2.example.com:
Looks up details relating to Sadie on irc2.example.com:
```plaintext
/CHECK Sadie irc2.example.com
```
```plaintext
/CHECK Sadie irc2.example.com
```
11 changes: 5 additions & 6 deletions docs/3/modules/chghost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ commands:
syntax: '`<nickname> <hostname>`'
description: |-
Changes the displayed hostname of &lt;nickname&gt; to &lt;hostname&gt;.
example: |-
Changes the hostname of Sadie to wibble.wobble:
example_commands: |-
Changes the hostname of Sadie to wibble.wobble:
```plaintext
/CHGHOST Sadie wibble.wobble
```
```plaintext
/CHGHOST Sadie wibble.wobble
```
special_notes: |-
This command only changes the displayed hostname of a user. Their real hostname will remain intact and still will match against bans.
11 changes: 5 additions & 6 deletions docs/3/modules/chgident.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ commands:
syntax: '`<nickname> <username>`'
description: |-
Changes the username (ident) of &lt;nickname&gt; to &lt;username&gt;.
example: |-
Changes the username (ident) of Sadie to wibble:
example_commands: |-
Changes the username (ident) of Sadie to wibble:
```plaintext
/CHGIDENT Sadie wibble
```
```plaintext
/CHGIDENT Sadie wibble
```
11 changes: 5 additions & 6 deletions docs/3/modules/chgname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ commands:
syntax: '`<nickname> <realname>`'
description: |-
Changes the real name (gecos) of &lt;nickname&gt; to &lt;realname&gt;.
example: |-
Changes the real name (gecos) of Sadie to "Wibble Wobble":
example_commands: |-
Changes the real name (gecos) of Sadie to "Wibble Wobble":
```plaintext
/CHGNAME Sadie :Wibble Wobble
```
```plaintext
/CHGNAME Sadie :Wibble Wobble
```
37 changes: 18 additions & 19 deletions docs/3/modules/clearchan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ commands:
syntax: '`<channel> [<action>] [<reason>]`'
description: |-
Mass punishes the members of the specified channel.
example: |-
Kills all members of #spam:
```plaintext
/CLEARCHAN #spam
```
Kicks all members of #spam:
```plaintext
/CLEARCHAN #spam KICK
```
G-lines all members of #spam with the reason "Spamming is bad":
```plaintext
/CLEARCHAN #spam G :Spamming is bad
```
command_details: |-
The action parameter should be set to one of the following values:
Expand All @@ -19,22 +37,3 @@ command_details: |-
KICK | Kick all members of the channel.
G | G-line all members of the channel for one hour.
Z | Z-line all members of the channel for one hour.
example_commands: |-
Kills all members of #spam:
```plaintext
/CLEARCHAN #spam
```
Kicks all members of #spam:
```plaintext
/CLEARCHAN #spam KICK
```
G-lines all members of #spam with the reason "Spamming is bad":
```plaintext
/CLEARCHAN #spam G :Spamming is bad
```
11 changes: 5 additions & 6 deletions docs/3/modules/clones.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ commands:
syntax: '`<limit>`'
description: |-
Lists all IP addresses from which there are more than &lt;limit&gt; connections.
example: |-
Lists IP addresses from which there are more than five connections:
example_commands: |-
Lists IP addresses from which there are more than five connections:
```plaintext
/CLONES 5
```
```plaintext
/CLONES 5
```
11 changes: 5 additions & 6 deletions docs/3/modules/customtitle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ commands:
syntax: '`<username> <password>`'
description: |-
Log into the account with the specified username and password.
example: |-
Logs into the account with the name Sadie and password fl00fyc4pyb4r4:
example_commands: |-
Logs into the account with the name Sadie and password fl00fyc4pyb4r4:
```plaintext
/TITLE Sadie fl00fyc4pyb4r4
```
```plaintext
/TITLE Sadie fl00fyc4pyb4r4
```
19 changes: 9 additions & 10 deletions docs/3/modules/cycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ commands:
syntax: '`<channel> [<reason>]`'
description: |-
Parts and rejoins the specified channel.
example: |-
Parts and rejoins the #example channel:
example_commands: |-
Parts and rejoins the #example channel:
```plaintext
/CYCLE #example
```
```plaintext
/CYCLE #example
```
Parts and rejoins the #example channel with "Be right back!" as the reason:
Parts and rejoins the #example channel with "Be right back!" as the reason:
```plaintext
/CYCLE #example :Be right back!
```
```plaintext
/CYCLE #example :Be right back!
```
35 changes: 17 additions & 18 deletions docs/3/modules/dccallow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,27 @@ commands:
syntax: '`[+]<nick> [<time>]`<br>`-<nick>`<br>`HELP`<br>`LIST`'
description: |-
Allows users to add other users to their DCC whitelist, remove other users from their DCC whitelist, and view the users on their DCC whitelist.
example: |-
Lists all users on your DCC whitelist:
example_commands: |-
Lists all users on your DCC whitelist:
```plaintext
/DCCALLOW LIST
```
```plaintext
/DCCALLOW LIST
```
Adds Adam to your DCC whitelist until the server expires it:
Adds Adam to your DCC whitelist until the server expires it:
```plaintext
/DCCALLOW +Adam
```
```plaintext
/DCCALLOW +Adam
```
Adds Sadie to your DCC whitelist for two hours:
Adds Sadie to your DCC whitelist for two hours:
```plaintext
/DCCALLOW +Sadie 2h
```
```plaintext
/DCCALLOW +Sadie 2h
```
Removes "Attila" from your DCC whitelist:
Removes "Attila" from your DCC whitelist:
```plaintext
/DCCALLOW -Attila
```
```plaintext
/DCCALLOW -Attila
```
33 changes: 16 additions & 17 deletions docs/3/modules/filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,30 +121,29 @@ commands:
syntax: '`<pattern>`<br>`<pattern> <action> <flags> [<duration>] <reason>`'
description: |-
Allows server operators to add and remove filters.
example: |-
!!! note ""
The following examples assume that the "glob" regex module is being used.
example_commands: |-
!!! note ""
The following examples assume that the "glob" regex module is being used.
See the `<filteropts>` documentation above for more information.
See the `<filteropts>` documentation above for more information.
G-lines users for saying the phrase "fluffy capybara" in `/PRIVMSG` and `/NOTICE` messages:
G-lines users for saying the phrase "fluffy capybara" in `/PRIVMSG` and `/NOTICE` messages:
```plaintext
/FILTER *fluffy?capybara* gline nop 1h :Fluffy capybaras are too cute for this network
```
```plaintext
/FILTER *fluffy?capybara* gline nop 1h :Fluffy capybaras are too cute for this network
```
Kills users who have "spam" in their `/PART` message:
Kills users who have "spam" in their `/PART` message:
```plaintext
/FILTER *spam* kill coP :Spam is off-topic on ExampleNet
```
```plaintext
/FILTER *spam* kill coP :Spam is off-topic on ExampleNet
```
Removes a filter on \*fluffy?capybara\*:
Removes a filter on \*fluffy?capybara\*:
```plaintext
/FILTER *fluffy?capybara*
```
```plaintext
/FILTER *fluffy?capybara*
```
snomasks:
- char: f
Expand Down
Loading

0 comments on commit 4e413e5

Please sign in to comment.