3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 11:59:43 +01:00

doc: update TOC headers

This commit is contained in:
Pragmatic Software 2020-01-12 10:23:32 -08:00
parent b14d29473c
commit 1f3bf44f6c
7 changed files with 321 additions and 301 deletions

View File

@ -1,72 +1,71 @@
Administrative # Administrative
--------------
<!-- md-toc-begin --> <!-- md-toc-begin -->
* [Logging in and out](#logging-in-and-out) * [Logging in and out](#logging-in-and-out)
* [login](#login) * [login](#login)
* [logout](#logout) * [logout](#logout)
* [Admin management commands](#admin-management-commands) * [Admin management commands](#admin-management-commands)
* [adminadd](#adminadd) * [adminadd](#adminadd)
* [adminrem](#adminrem) * [adminrem](#adminrem)
* [Admin levels](#admin-levels) * [Admin levels](#admin-levels)
* [adminset](#adminset) * [adminset](#adminset)
* [adminunset](#adminunset) * [adminunset](#adminunset)
* [Admin metadata list](#admin-metadata-list) * [Admin metadata list](#admin-metadata-list)
* [Listing admins](#listing-admins) * [Listing admins](#listing-admins)
* [Channel management commands](#channel-management-commands) * [Channel management commands](#channel-management-commands)
* [join](#join) * [join](#join)
* [part](#part) * [part](#part)
* [chanadd](#chanadd) * [chanadd](#chanadd)
* [chanrem](#chanrem) * [chanrem](#chanrem)
* [chanset](#chanset) * [chanset](#chanset)
* [chanunset](#chanunset) * [chanunset](#chanunset)
* [chanlist](#chanlist) * [chanlist](#chanlist)
* [Channel metadata list](#channel-metadata-list) * [Channel metadata list](#channel-metadata-list)
* [ignore](#ignore) * [ignore](#ignore)
* [unignore](#unignore) * [unignore](#unignore)
* [whitelist](#whitelist) * [whitelist](#whitelist)
* [blacklist](#blacklist) * [blacklist](#blacklist)
* [op](#op) * [op](#op)
* [deop](#deop) * [deop](#deop)
* [voice](#voice) * [voice](#voice)
* [devoice](#devoice) * [devoice](#devoice)
* [mode](#mode) * [mode](#mode)
* [ban/mute](#banmute) * [ban/mute](#banmute)
* [unban/unmute](#unbanunmute) * [unban/unmute](#unbanunmute)
* [invite](#invite) * [invite](#invite)
* [kick](#kick) * [kick](#kick)
* [Module management commands](#module-management-commands) * [Module management commands](#module-management-commands)
* [load](#load) * [load](#load)
* [unload](#unload) * [unload](#unload)
* [Plugin management commands](#plugin-management-commands) * [Plugin management commands](#plugin-management-commands)
* [plug](#plug) * [plug](#plug)
* [unplug](#unplug) * [unplug](#unplug)
* [replug](#replug) * [replug](#replug)
* [pluglist](#pluglist) * [pluglist](#pluglist)
* [Miscellaneous commands](#miscellaneous-commands) * [Miscellaneous commands](#miscellaneous-commands)
* [export](#export) * [export](#export)
* [refresh](#refresh) * [refresh](#refresh)
* [reload](#reload) * [reload](#reload)
* [sl](#sl) * [sl](#sl)
* [die](#die) * [die](#die)
<!-- md-toc-end --> <!-- md-toc-end -->
### Logging in and out ## Logging in and out
You cannot use any of the admin commands unless you login. Note that login requires that your hostmask matches PBot's records. You cannot use any of the admin commands unless you login. Note that login requires that your hostmask matches PBot's records.
However, if your admin account have the `loggedin` and `stayloggedin` metadata set to a true value then you will not need to login. However, if your admin account have the `loggedin` and `stayloggedin` metadata set to a true value then you will not need to login.
#### login ### login
Logs into PBot. Logs into PBot.
Usage: `login [channel] <password>` Usage: `login [channel] <password>`
#### logout ### logout
Logs out of PBot. Logs out of PBot.
Usage: `logout` Usage: `logout`
### Admin management commands ## Admin management commands
#### adminadd ### adminadd
Adds a new admin to PBot. Adds a new admin to PBot.
Usage: `adminadd <name> <channel> <hostmask> <level> <password>` Usage: `adminadd <name> <channel> <hostmask> <level> <password>`
@ -79,12 +78,12 @@ Parameter | Description
`<level>` | An integer representing their level of privileges. See [admin-levels](#admin-levels). `<level>` | An integer representing their level of privileges. See [admin-levels](#admin-levels).
`<password>` | The password the admin will use to login (from /msg!). A password is not required if the `stayloggedin` and `loggedin` metadata are set for the admin; however, a dummy password still needs to be set. `<password>` | The password the admin will use to login (from /msg!). A password is not required if the `stayloggedin` and `loggedin` metadata are set for the admin; however, a dummy password still needs to be set.
#### adminrem ### adminrem
Removes an admin from PBot. You can use the name field or the hostmask field that was set via `adminadd`. Removes an admin from PBot. You can use the name field or the hostmask field that was set via `adminadd`.
Usage: `adminrem <channel> <name or hostmask>` Usage: `adminrem <channel> <name or hostmask>`
##### Admin levels ### Admin levels
This is a list of admin commands allowed by each admin level. Higher level admins have access to all lower level admin commands. This is a list of admin commands allowed by each admin level. Higher level admins have access to all lower level admin commands.
Level | Commands Level | Commands
@ -95,19 +94,19 @@ Level | Commands
90 | sl, plug, unplug, replug, load, unload, reload, export, rebuildaliases, refresh, die 90 | sl, plug, unplug, replug, load, unload, reload, export, rebuildaliases, refresh, die
99 | eval 99 | eval
#### adminset ### adminset
Sets metadata for an admin account. You can use the `name` field or the `hostmask` field that was set via `adminadd`. See also: [admin metadata list](#admin-metadata-list). Sets metadata for an admin account. You can use the `name` field or the `hostmask` field that was set via `adminadd`. See also: [admin metadata list](#admin-metadata-list).
If `key` is omitted, it will list all the keys and values that are set. If `value` is omitted, it will show the value for `key`. If `key` is omitted, it will list all the keys and values that are set. If `value` is omitted, it will show the value for `key`.
Usage: `adminset <channel> <name or hostmask> [<key> [value]]` Usage: `adminset <channel> <name or hostmask> [<key> [value]]`
#### adminunset ### adminunset
Deletes a metadata key from an admin account. You can use the name `field` or the `hostmask` field that was set via adminadd. Deletes a metadata key from an admin account. You can use the name `field` or the `hostmask` field that was set via adminadd.
Usage: `adminunset <channel> <name or hostmask> <key>` Usage: `adminunset <channel> <name or hostmask> <key>`
##### Admin metadata list ### Admin metadata list
This is a list of recognized metadata keys for admin accounts. This is a list of recognized metadata keys for admin accounts.
Name | Description Name | Description
@ -118,7 +117,7 @@ Name | Description
`loggedin` | Whether the admin is logged in or not. `loggedin` | Whether the admin is logged in or not.
`stayloggedin` | Do not log the admin out when they part/quit. `stayloggedin` | Do not log the admin out when they part/quit.
#### Listing admins ### Listing admins
To list admins, use the `list admins` command. This is not an admin command, but To list admins, use the `list admins` command. This is not an admin command, but
it is included here for completeness. it is included here for completeness.
@ -128,66 +127,66 @@ When used in a channel, it will list only the admins for that channel, plus all
global admins. When used from private message, it will list all admins from global admins. When used from private message, it will list all admins from
all channels, including global admins. all channels, including global admins.
### Channel management commands ## Channel management commands
#### join ### join
To temporarily join a channel, use the `join` command. The channels may be a comma- To temporarily join a channel, use the `join` command. The channels may be a comma-
separated list. separated list.
Usage: `join <channel(s)>` Usage: `join <channel(s)>`
#### part ### part
To temporarily leave a channel (that is, without removing it from PBot's list To temporarily leave a channel (that is, without removing it from PBot's list
of channels), use the `part` command. The channels may be a comma-separated of channels), use the `part` command. The channels may be a comma-separated
list. list.
Usage `part <channel(s)>` Usage `part <channel(s)>`
#### chanadd ### chanadd
`chanadd` permanently adds a channel to PBot's list of channels to auto-join and manage. `chanadd` permanently adds a channel to PBot's list of channels to auto-join and manage.
Usage: `chanadd <channel>` Usage: `chanadd <channel>`
#### chanrem ### chanrem
`chanrem` removes a channel from PBot's list of channels to auto-join and manage. `chanrem` removes a channel from PBot's list of channels to auto-join and manage.
Usage: `chanrem <channel>` Usage: `chanrem <channel>`
#### chanset ### chanset
`chanset` sets a channel's metadata. See [channel metadata list](#channel-metadata-list) `chanset` sets a channel's metadata. See [channel metadata list](#channel-metadata-list)
Usage: `chanset <channel> [key [value]]` Usage: `chanset <channel> [key [value]]`
If both `key` and `value` are omitted, chanset will show all the keys and values for that channel. If only `value` is omitted, chanset will show the value for that key. If both `key` and `value` are omitted, chanset will show all the keys and values for that channel. If only `value` is omitted, chanset will show the value for that key.
#### chanunset ### chanunset
`chanunset` deletes a channel's metadata key. `chanunset` deletes a channel's metadata key.
Usage: `chanunset <channel> <key>` Usage: `chanunset <channel> <key>`
#### chanlist ### chanlist
`chanlist` lists all added channels and their metadata keys and values. `chanlist` lists all added channels and their metadata keys and values.
##### Channel metadata list ### Channel metadata list
Name | Description Name | Description
--- | --- --- | ---
`enabled` | When set to a true value, PBot will auto-join this channel after identifying to NickServ (unless `general.autojoin_wait_for_nickserv` is `0`, in which case auto-join happens immediately). `enabled` | When set to a true value, PBot will auto-join this channel after identifying to NickServ (unless `general.autojoin_wait_for_nickserv` is `0`, in which case auto-join happens immediately).
`chanop` | When set to a true value, PBot will perform channel management (anti-flooding, ban-evasion, etc). `chanop` | When set to a true value, PBot will perform channel management (anti-flooding, ban-evasion, etc).
`permop` | When set to a true value, PBot will automatically op itself when joining and remain opped instead of automatically opping and deopping as necessary. `permop` | When set to a true value, PBot will automatically op itself when joining and remain opped instead of automatically opping and deopping as necessary.
#### ignore ### ignore
Ignore a user. If you omit `[channel]` PBot will ignore the user in all channels, including private messages. Ignore a user. If you omit `[channel]` PBot will ignore the user in all channels, including private messages.
Usage: `ignore <hostmask regex> [channel [timeout]]` Usage: `ignore <hostmask regex> [channel [timeout]]`
Timeout can be specified as an relative time in English; for instance, `5 minutes`, `1 month and 2 weeks`, `next thursday`, `friday after next`, `forever` and such. Timeout can be specified as an relative time in English; for instance, `5 minutes`, `1 month and 2 weeks`, `next thursday`, `friday after next`, `forever` and such.
#### unignore ### unignore
Unignores a user. If you omit `[channel]` PBot will unignore the user from all channels, including private messages. Unignores a user. If you omit `[channel]` PBot will unignore the user from all channels, including private messages.
Usage: `unignore <hostmask regex> [channel]` Usage: `unignore <hostmask regex> [channel]`
#### whitelist ### whitelist
Whitelists a hostmask regex to be exempt from ban evasions or anti-flood enforcement. Whitelists a hostmask regex to be exempt from ban evasions or anti-flood enforcement.
Usages: Usages:
@ -196,7 +195,7 @@ Usages:
- `whitelist add <channel> <hostmask>` - `whitelist add <channel> <hostmask>`
- `whitelist remove <channel> <hostmask>` - `whitelist remove <channel> <hostmask>`
#### blacklist ### blacklist
Blacklists a hostmask regex from joining a channel. Blacklists a hostmask regex from joining a channel.
Usages: Usages:
@ -205,10 +204,10 @@ Usages:
- `blacklist add <hostmask regex> [channel]` - `blacklist add <hostmask regex> [channel]`
- `blacklist remove <hostmask regex> [channel]` - `blacklist remove <hostmask regex> [channel]`
#### op ### op
#### deop ### deop
#### voice ### voice
#### devoice ### devoice
The `op`, `deop`, `voice` and `devoice` commands all perform their respective named action. The `op`, `deop`, `voice` and `devoice` commands all perform their respective named action.
The `targets` parameter can be a list of multiple nicks, optionally containing The `targets` parameter can be a list of multiple nicks, optionally containing
@ -230,7 +229,7 @@ From private message:
* `voice <channel> [targets]` * `voice <channel> [targets]`
* `devoice <channel> [targets]` * `devoice <channel> [targets]`
#### mode ### mode
Sets or unsets channel or user modes. Sets or unsets channel or user modes.
Usage: `mode [channel] <flags> [targets]` Usage: `mode [channel] <flags> [targets]`
@ -239,7 +238,7 @@ PBot extends the IRC `MODE` command in useful ways. For instance, the `targets`
parameter may contain wildcards. To op everybody whose nick ends with `|dev` you parameter may contain wildcards. To op everybody whose nick ends with `|dev` you
can do `!mode +o *|dev` in a channel. can do `!mode +o *|dev` in a channel.
#### ban/mute ### ban/mute
Bans or mutes a user. If the argument is a nick instead of a hostmask, it will determine an appropriate banmask for that nick. Bans or mutes a user. If the argument is a nick instead of a hostmask, it will determine an appropriate banmask for that nick.
The argument can be a comma-separated list of multiple nicks or masks. The argument can be a comma-separated list of multiple nicks or masks.
@ -249,7 +248,7 @@ Usages:
If `timeout` is omitted, PBot will ban the user for 24 hours. Timeout can be specified as an relative time in English; for instance, `5 minutes`, `1 month and 2 weeks`, `next thursday`, `friday after next`, `forever` and such. If `timeout` is omitted, PBot will ban the user for 24 hours. Timeout can be specified as an relative time in English; for instance, `5 minutes`, `1 month and 2 weeks`, `next thursday`, `friday after next`, `forever` and such.
#### unban/unmute ### unban/unmute
Unbans or unmutes a user. If the argument is a nick instead of a hostmask, it will find all bans that match any of that nick's hostmasks or NickServ accounts and unban them. Unbans or unmutes a user. If the argument is a nick instead of a hostmask, it will find all bans that match any of that nick's hostmasks or NickServ accounts and unban them.
The argument can be a comma-separated list of multiple nicks or masks. The argument can be a comma-separated list of multiple nicks or masks.
@ -257,22 +256,22 @@ Usages:
- `unban <nick or hostmask> [channel]` - `unban <nick or hostmask> [channel]`
- `unmute <nick or hostmask> [channel]` - `unmute <nick or hostmask> [channel]`
#### invite ### invite
Invites a user to a channel. Invites a user to a channel.
Usage: `invite [channel] <nick>` Usage: `invite [channel] <nick>`
#### kick ### kick
Removes a user from the channel. `<nick>` can be a comma-separated list of multiple users, optionally containing wildcards. If `[reason]` is omitted, a random insult will be used. Removes a user from the channel. `<nick>` can be a comma-separated list of multiple users, optionally containing wildcards. If `[reason]` is omitted, a random insult will be used.
Usage from channel: `kick <nick> [reason]` Usage from channel: `kick <nick> [reason]`
From private message: `kick <channel> <nick> [reason]` From private message: `kick <channel> <nick> [reason]`
### Module management commands ## Module management commands
Note that modules are "reloaded" each time they are executed. There is no need to `refresh` after editing a module. Note that modules are "reloaded" each time they are executed. There is no need to `refresh` after editing a module.
#### load ### load
This command loads a module in `$data_dir/modules/` as a PBot command. It is This command loads a module in `$data_dir/modules/` as a PBot command. It is
equivalent to `factadd`ing a new keyword and then setting its `type` to `module`. equivalent to `factadd`ing a new keyword and then setting its `type` to `module`.
@ -282,30 +281,30 @@ For example, to load `$data_dir/modules/qalc.sh` as the `qalc` command:
<pragma-> !load qalc qalc.sh <pragma-> !load qalc qalc.sh
#### unload ### unload
This command unloads a module. It is equivalent to deleting the factoid keyword This command unloads a module. It is equivalent to deleting the factoid keyword
the module was loaded as. the module was loaded as.
Usage: `unload <keyword>` Usage: `unload <keyword>`
### Plugin management commands ## Plugin management commands
#### plug ### plug
Loads a plugin into PBot. Loads a plugin into PBot.
Usage: `plug <plugin>` Usage: `plug <plugin>`
#### unplug ### unplug
Unloads a plugin from PBot. Unloads a plugin from PBot.
Usage: `unplug <plugin>` Usage: `unplug <plugin>`
#### replug ### replug
Reloads a plugin into PBot. The plugin is first unloaded and then it is loaded again. Reloads a plugin into PBot. The plugin is first unloaded and then it is loaded again.
Usage: `replug <plugin>` Usage: `replug <plugin>`
#### pluglist ### pluglist
Lists all currently loaded plugins. This isn't an admin command, but it is included here for completeness. Lists all currently loaded plugins. This isn't an admin command, but it is included here for completeness.
Usage: `pluglist` Usage: `pluglist`
@ -313,27 +312,27 @@ Usage: `pluglist`
<pragma-> !pluglist <pragma-> !pluglist
<PBot> Loaded plugins: ActionTrigger, AntiAway, AntiKickAutoRejoin, AntiNickSpam, AntiRepeat, AntiTwitter, AutoRejoin, GoogleSearch, Quotegrabs, RemindMe, UrlTitles <PBot> Loaded plugins: ActionTrigger, AntiAway, AntiKickAutoRejoin, AntiNickSpam, AntiRepeat, AntiTwitter, AutoRejoin, GoogleSearch, Quotegrabs, RemindMe, UrlTitles
### Miscellaneous commands ## Miscellaneous commands
These are some of the miscellaneous admin commands that have not been covered These are some of the miscellaneous admin commands that have not been covered
above or in the rest of the PBot documentation. above or in the rest of the PBot documentation.
#### export ### export
Exports specified list to HTML file in `$data_dir`. Exports specified list to HTML file in `$data_dir`.
Usage: `export <factoids|quotegrabs>` Usage: `export <factoids|quotegrabs>`
#### refresh ### refresh
Refreshes/reloads PBot core modules and plugins (not the command-line modules since those are executed/loaded each time they are invoked). Refreshes/reloads PBot core modules and plugins (not the command-line modules since those are executed/loaded each time they are invoked).
#### reload ### reload
Reloads a data or configuration file from `$data_dir`. This is useful if you Reloads a data or configuration file from `$data_dir`. This is useful if you
manually edit a data or configuration file and you want PBot to know about the manually edit a data or configuration file and you want PBot to know about the
modifications. modifications.
Usage `reload <admins|bantimeouts|blacklist|channels|factoids|funcs|ignores|mutetimeouts|registry|whitelist>` Usage `reload <admins|bantimeouts|blacklist|channels|factoids|funcs|ignores|mutetimeouts|registry|whitelist>`
#### sl ### sl
Sends a raw IRC line to the server. This is useful if you want to execute any Sends a raw IRC line to the server. This is useful if you want to execute any
IRC command on the IRC server, in its raw pure form. Use the `sl` command when IRC command on the IRC server, in its raw pure form. Use the `sl` command when
PBot does not have a built-in command to do what you need. PBot does not have a built-in command to do what you need.
@ -343,6 +342,6 @@ Usage: `sl <irc command>`
<pragma-> sl PRIVMSG #channel :Test message <pragma-> sl PRIVMSG #channel :Test message
<PBot> Test message <PBot> Test message
#### die ### die
Tells PBot to disconnect and exit. Tells PBot to disconnect and exit.

View File

@ -1,32 +1,27 @@
Anti-Abuse # Anti-Abuse
==========
PBot can monitor channels for abusive behavior and take appropriate action. PBot can monitor channels for abusive behavior and take appropriate action.
<!-- md-toc-begin --> <!-- md-toc-begin -->
* [Anti-Abuse](#anti-abuse) * [Flood control](#flood-control)
* [Flood control](#flood-control) * [Message flood](#message-flood)
* [Message flood](#message-flood) * [Join flood](#join-flood)
* [Join flood](#join-flood) * [Enter key abuse](#enter-key-abuse)
* [Enter key abuse](#enter-key-abuse) * [Nick flood](#nick-flood)
* [Nick flood](#nick-flood) * [Anti-away/Nick-control](#anti-awaynick-control)
* [Anti-away/Nick-control](#anti-awaynick-control) * [Anti-auto-rejoin control](#anti-auto-rejoin-control)
* [Anti-auto-rejoin control](#anti-auto-rejoin-control) * [Opping/Deopping](#oppingdeopping)
* [Opping/Deopping](#oppingdeopping)
<!-- md-toc-end --> <!-- md-toc-end -->
Flood control ## Flood control
=============
PBot can monitor the channel for excessive rapid traffic originating from an individual and automatically ban the offender for a certain length of time. PBot can monitor the channel for excessive rapid traffic originating from an individual and automatically ban the offender for a certain length of time.
Message flood ### Message flood
-------------
If four (4) or more messages are sent within five (5) seconds, the flood control is triggered. The offender will be muted for 30 seconds for the first offense. Each additional offense will result in the offender being muted for a much longer period. For example, the first offense will result in 30 seconds, the 2nd offense will be 5 minutes, the 3rd will be 1 hour, and so on. The offense counter is decremented once every 24 hours. If four (4) or more messages are sent within five (5) seconds, the flood control is triggered. The offender will be muted for 30 seconds for the first offense. Each additional offense will result in the offender being muted for a much longer period. For example, the first offense will result in 30 seconds, the 2nd offense will be 5 minutes, the 3rd will be 1 hour, and so on. The offense counter is decremented once every 24 hours.
The offender will be sent the following private message: "You have been muted due to flooding. Please use a web paste service such as http://ideone.com for lengthy pastes. You will be allowed to speak again in $timeout." The offender will be sent the following private message: "You have been muted due to flooding. Please use a web paste service such as http://ideone.com for lengthy pastes. You will be allowed to speak again in $timeout."
Join flood ### Join flood
----------
If four (4) or more JOINs are observed within thirty (30) minutes *without any messages in between joins*, the offender will be forwarded to another channel for a limited time: 2^(number_of_offenses + 2) hours. If four (4) or more JOINs are observed within thirty (30) minutes *without any messages in between joins*, the offender will be forwarded to another channel for a limited time: 2^(number_of_offenses + 2) hours.
In addition to private instructions from PBot, this channel will have a /topic and ChanServ on-join message with instructions explaining to the offender how to remove the forwarding. The instructions are to message PBot with: `unbanme`. In addition to private instructions from PBot, this channel will have a /topic and ChanServ on-join message with instructions explaining to the offender how to remove the forwarding. The instructions are to message PBot with: `unbanme`.
@ -35,31 +30,26 @@ Any messages sent to the public channel by the user at any time will reset their
The offender will be sent the following private message: "You have been banned from $channel due to join flooding. If your connection issues have been resolved, or this was an accident, you may request an unban at any time by responding to this message with: `unbanme`, otherwise you will be automatically unbanned in $timeout." The offender will be sent the following private message: "You have been banned from $channel due to join flooding. If your connection issues have been resolved, or this was an accident, you may request an unban at any time by responding to this message with: `unbanme`, otherwise you will be automatically unbanned in $timeout."
Enter key abuse ### Enter key abuse
---------------
If four (4) consecutive messages are sent with ten (10) seconds or less between individual messages and without another person speaking, an enter-key-abuse counter is incremented. This counter will then continue to be incremented every two (2) consecutive messages with ten (10) seconds or less in between until another person speaks or more than ten (10) seconds have elapsed, whereupon it returns to requiring four (4) consecutive messages. When this counter reaches three (3) or greater, the offender will be muted using the same timeout rules as message flooding. This counter is automatically decremented once per hour. If four (4) consecutive messages are sent with ten (10) seconds or less between individual messages and without another person speaking, an enter-key-abuse counter is incremented. This counter will then continue to be incremented every two (2) consecutive messages with ten (10) seconds or less in between until another person speaks or more than ten (10) seconds have elapsed, whereupon it returns to requiring four (4) consecutive messages. When this counter reaches three (3) or greater, the offender will be muted using the same timeout rules as message flooding. This counter is automatically decremented once per hour.
The offender will be sent the following private message: "You have been muted due to abusing the enter key. Please do not split your sentences over multiple messages. You will be allowed to speak again in $timeout." The offender will be sent the following private message: "You have been muted due to abusing the enter key. Please do not split your sentences over multiple messages. You will be allowed to speak again in $timeout."
Nick flood ### Nick flood
----------
If four (4) or more nick-changes are observed within thirty (30) minutes, the nick-change flood control is triggered. The offender will be muted for 15 minutes for the first offense. Each additional offense will result in the offender being muted for a much longer period. The offense counter is decremented once every 24 hours. If four (4) or more nick-changes are observed within thirty (30) minutes, the nick-change flood control is triggered. The offender will be muted for 15 minutes for the first offense. Each additional offense will result in the offender being muted for a much longer period. The offense counter is decremented once every 24 hours.
The offender will be sent the following private message: "You have been temporarily banned due to nick-change flooding. You will be unbanned in $timeout." The offender will be sent the following private message: "You have been temporarily banned due to nick-change flooding. You will be unbanned in $timeout."
Anti-away/Nick-control ## Anti-away/Nick-control
======================
PBot can detect nick-changes to undesirable nicks such as those ending with |away, as well as undesirable ACTIONs such as /me is away. PBot can detect nick-changes to undesirable nicks such as those ending with |away, as well as undesirable ACTIONs such as /me is away.
When such a case is detected, PBot will kick the offender with a link to http://sackheads.org/~bnaylor/spew/away_msgs.html in the kick message. When such a case is detected, PBot will kick the offender with a link to http://sackheads.org/~bnaylor/spew/away_msgs.html in the kick message.
Anti-auto-rejoin control ## Anti-auto-rejoin control
========================
PBot can detect if someone immediately auto-rejoins after having been kicked. PBot can detect if someone immediately auto-rejoins after having been kicked.
When such a case is detected, PBot will kickban the offender (with a kick message of "$timeout ban for auto-rejoining after kick") for 5 minutes for the first offense. Each additional offense will result in the offender being banned for a much longer period. The offense counter is decremented once every 24 hours. When such a case is detected, PBot will kickban the offender (with a kick message of "$timeout ban for auto-rejoining after kick") for 5 minutes for the first offense. Each additional offense will result in the offender being banned for a much longer period. The offense counter is decremented once every 24 hours.
Opping/Deopping ## Opping/Deopping
===============
ChanServ can op and deop PBot as necessary, unless the channel `permop` meta-data is set to a true value. PBot will wait until about 5 minutes have elapsed before requesting a deop from ChanServ. This timeout can be controlled via the `general.deop_timeout` registry value, which can be overriden on a per-channel basis. ChanServ can op and deop PBot as necessary, unless the channel `permop` meta-data is set to a true value. PBot will wait until about 5 minutes have elapsed before requesting a deop from ChanServ. This timeout can be controlled via the `general.deop_timeout` registry value, which can be overriden on a per-channel basis.

View File

@ -1,66 +1,66 @@
# Factoids # Factoids
<!-- md-toc-begin --> <!-- md-toc-begin -->
* [About](#about) * [About](#about)
* [Channel namespaces](#channel-namespaces) * [Channel namespaces](#channel-namespaces)
* [Special commands](#special-commands) * [Special commands](#special-commands)
* [/say](#say) * [/say](#say)
* [/me](#me) * [/me](#me)
* [/call](#call) * [/call](#call)
* [/msg](#msg) * [/msg](#msg)
* [/code](#code) * [/code](#code)
* [Supported languages](#supported-languages) * [Supported languages](#supported-languages)
* [Special variables](#special-variables) * [Special variables](#special-variables)
* [testargs example](#testargs-example) * [testargs example](#testargs-example)
* [Setting a usage message](#setting-a-usage-message) * [Setting a usage message](#setting-a-usage-message)
* [poll/vote example](#pollvote-example) * [poll/vote example](#pollvote-example)
* [SpongeBob Mock meme example](#spongebob-mock-meme-example) * [SpongeBob Mock meme example](#spongebob-mock-meme-example)
* [Using command-piping](#using-command-piping) * [Using command-piping](#using-command-piping)
* [Improving SpongeBob Mock meme](#improving-spongebob-mock-meme) * [Improving SpongeBob Mock meme](#improving-spongebob-mock-meme)
* [Formatting and editing lengthy Code Factoids](#formatting-and-editing-lengthy-code-factoids) * [Formatting and editing lengthy Code Factoids](#formatting-and-editing-lengthy-code-factoids)
* [Special variables](#special-variables-1) * [Special variables](#special-variables-1)
* [$args](#args) * [$args](#args)
* [$arg[n]](#argn) * [$arg[n]](#argn)
* [$arg[n:m]](#argnm) * [$arg[n:m]](#argnm)
* [$arglen](#arglen) * [$arglen](#arglen)
* [$channel](#channel) * [$channel](#channel)
* [$nick](#nick) * [$nick](#nick)
* [$randomnick](#randomnick) * [$randomnick](#randomnick)
* [$0](#0) * [$0](#0)
* [List variables](#list-variables) * [List variables](#list-variables)
* [Expansion modifiers](#expansion-modifiers) * [Expansion modifiers](#expansion-modifiers)
* [action_with_args](#action_with_args) * [action_with_args](#action_with_args)
* [add_nick](#add_nick) * [add_nick](#add_nick)
* [Adding a factoid](#adding-a-factoid) * [Adding a factoid](#adding-a-factoid)
* [factadd](#factadd) * [factadd](#factadd)
* [Viewing/triggering a factoid](#viewingtriggering-a-factoid) * [Viewing/triggering a factoid](#viewingtriggering-a-factoid)
* [Viewing/triggering another channel's factoid](#viewingtriggering-another-channels-factoid) * [Viewing/triggering another channel's factoid](#viewingtriggering-another-channels-factoid)
* [fact](#fact) * [fact](#fact)
* [Deleting a factoid](#deleting-a-factoid) * [Deleting a factoid](#deleting-a-factoid)
* [factrem](#factrem) * [factrem](#factrem)
* [forget](#forget) * [forget](#forget)
* [Aliasing a factoid](#aliasing-a-factoid) * [Aliasing a factoid](#aliasing-a-factoid)
* [factalias](#factalias) * [factalias](#factalias)
* [Moving/renaming a factoid](#movingrenaming-a-factoid) * [Moving/renaming a factoid](#movingrenaming-a-factoid)
* [factmove](#factmove) * [factmove](#factmove)
* [Changing a factoid](#changing-a-factoid) * [Changing a factoid](#changing-a-factoid)
* [factchange](#factchange) * [factchange](#factchange)
* [factundo](#factundo) * [factundo](#factundo)
* [factredo](#factredo) * [factredo](#factredo)
* [Factoid Metadata](#factoid-metadata) * [Factoid Metadata](#factoid-metadata)
* [factset](#factset) * [factset](#factset)
* [factunset](#factunset) * [factunset](#factunset)
* [Factoid Metadata List](#factoid-metadata-list) * [Factoid Metadata List](#factoid-metadata-list)
* [Finding a factoid](#finding-a-factoid) * [Finding a factoid](#finding-a-factoid)
* [factfind](#factfind) * [factfind](#factfind)
* [Information about a factoid](#information-about-a-factoid) * [Information about a factoid](#information-about-a-factoid)
* [factinfo](#factinfo) * [factinfo](#factinfo)
* [factshow](#factshow) * [factshow](#factshow)
* [factset](#factset-1) * [factset](#factset-1)
* [factlog](#factlog) * [factlog](#factlog)
* [count](#count) * [count](#count)
* [histogram](#histogram) * [histogram](#histogram)
* [top20](#top20) * [top20](#top20)
<!-- md-toc-end --> <!-- md-toc-end -->
## About ## About

View File

@ -1,80 +1,114 @@
Modules # Modules
-------
PBot has several external command-line modules. Here is the documentation for most of them.
<!-- md-toc-begin --> <!-- md-toc-begin -->
* [cc](#cc) * [About](#about)
* [Usage](#usage) * [Creating modules](#creating-modules)
* [Supported Languages](#supported-languages) * [Documentation for built-in modules](#documentation-for-built-in-modules)
* [Default Language](#default-language) * [cc](#cc)
* [Disallowed system calls](#disallowed-system-calls) * [Usage](#usage)
* [Program termination with no output](#program-termination-with-no-output) * [Supported Languages](#supported-languages)
* [Abnormal program termination](#abnormal-program-termination) * [Default Language](#default-language)
* [C and C++ Functionality](#c-and-c-functionality) * [Disallowed system calls](#disallowed-system-calls)
* [Using the preprocessor](#using-the-preprocessor) * [Program termination with no output](#program-termination-with-no-output)
* [Default #includes](#default-includes) * [Abnormal program termination](#abnormal-program-termination)
* [Using #include](#using-include) * [C and C++ Functionality](#c-and-c-functionality)
* [Using #define](#using-define) * [Using the preprocessor](#using-the-preprocessor)
* [main() Function Unnecessary](#main-function-unnecessary) * [Default #includes](#default-includes)
* [Embedding Newlines](#embedding-newlines) * [Using #include](#using-include)
* [Printing in binary/base2](#printing-in-binarybase2) * [Using #define](#using-define)
* [Using the GDB debugger](#using-the-gdb-debugger) * [main() Function Unnecessary](#main-function-unnecessary)
* [print](#print) * [Embedding Newlines](#embedding-newlines)
* [ptype](#ptype) * [Printing in binary/base2](#printing-in-binarybase2)
* [watch](#watch) * [Using the GDB debugger](#using-the-gdb-debugger)
* [trace](#trace) * [print](#print)
* [gdb](#gdb) * [ptype](#ptype)
* [Interactive Editing](#interactive-editing) * [watch](#watch)
* [copy](#copy) * [trace](#trace)
* [show](#show) * [gdb](#gdb)
* [diff](#diff) * [Interactive Editing](#interactive-editing)
* [paste](#paste) * [copy](#copy)
* [run](#run) * [show](#show)
* [undo](#undo) * [diff](#diff)
* [s//](#s) * [paste](#paste)
* [replace](#replace) * [run](#run)
* [prepend](#prepend) * [undo](#undo)
* [append](#append) * [s//](#s)
* [remove](#remove) * [replace](#replace)
* [Some Examples](#some-examples) * [prepend](#prepend)
* [english](#english) * [append](#append)
* [expand](#expand) * [remove](#remove)
* [prec](#prec) * [Some Examples](#some-examples)
* [paren](#paren) * [english](#english)
* [faq](#faq) * [expand](#expand)
* [cfact](#cfact) * [prec](#prec)
* [cjeopardy](#cjeopardy) * [paren](#paren)
* [hint](#hint) * [faq](#faq)
* [what](#what) * [cfact](#cfact)
* [w](#w) * [cjeopardy](#cjeopardy)
* [filter](#filter) * [hint](#hint)
* [score](#score) * [what](#what)
* [rank](#rank) * [w](#w)
* [reset](#reset) * [filter](#filter)
* [qstats](#qstats) * [score](#score)
* [qshow](#qshow) * [rank](#rank)
* [c99std](#c99std) * [reset](#reset)
* [c11std](#c11std) * [qstats](#qstats)
* [man](#man) * [qshow](#qshow)
* [google](#google) * [c99std](#c99std)
* [define](#define) * [c11std](#c11std)
* [dict](#dict) * [man](#man)
* [foldoc](#foldoc) * [google](#google)
* [vera](#vera) * [define](#define)
* [udict](#udict) * [dict](#dict)
* [wdict](#wdict) * [foldoc](#foldoc)
* [acronym](#acronym) * [vera](#vera)
* [math](#math) * [udict](#udict)
* [calc](#calc) * [wdict](#wdict)
* [qalc](#qalc) * [acronym](#acronym)
* [compliment](#compliment) * [math](#math)
* [insult](#insult) * [calc](#calc)
* [excuse](#excuse) * [qalc](#qalc)
* [horoscope](#horoscope) * [compliment](#compliment)
* [quote](#quote) * [insult](#insult)
* [excuse](#excuse)
* [horoscope](#horoscope)
* [quote](#quote)
<!-- md-toc-end --> <!-- md-toc-end -->
## About
Modules are external command-line executable programs and scripts that can be
loaded via PBot Factoids.
## Creating modules
Suppose you have the [Qalculate!](https://qalculate.github.io/) command-line
program and you want to provide a PBot command for it. You can create a _very_ simple
shell script containing:
#!/bin/sh
qalc "$*"
And let's call it `qalc.sh` and put it in PBot's `modules/` directory.
Then you can add the `qalc` factoid:
!factadd global qalc qalc.sh
And then set its `type` to `module`:
!factset global qalc type module
Alternatively, you can simply use the [`load`](Admin.md#load) command:
!load qalc qalc.sh
Now you have a `qalc` calculator in PBot!
<pragma-> !qalc 2 * 2
<PBot> 2 * 2 = 4
## Documentation for built-in modules
PBot comes several command-line modules included. Here is the documentation for most of them.
### cc ### cc
Code compiler (and executor). This command will compile and execute user-provided code in a number of languages, and then display the compiler and/or program output. Code compiler (and executor). This command will compile and execute user-provided code in a number of languages, and then display the compiler and/or program output.

View File

@ -1,37 +1,35 @@
QuickStart # QuickStart
==========
<!-- md-toc-begin --> <!-- md-toc-begin -->
* [Installation](#installation) * [Installation](#installation)
* [Installing Perl](#installing-perl) * [Installing Perl](#installing-perl)
* [Installing CPAN modules](#installing-cpan-modules) * [Installing CPAN modules](#installing-cpan-modules)
* [Installing PBot](#installing-pbot) * [Installing PBot](#installing-pbot)
* [git (recommended)](#git-recommended) * [git (recommended)](#git-recommended)
* [Download zip archive](#download-zip-archive) * [Download zip archive](#download-zip-archive)
* [First-time Configuration](#first-time-configuration) * [First-time Configuration](#first-time-configuration)
* [Clone data-directory](#clone-data-directory) * [Clone data-directory](#clone-data-directory)
* [Quick-start command](#quick-start-command) * [Quick-start command](#quick-start-command)
* [Edit Registry](#edit-registry) * [Edit Registry](#edit-registry)
* [Recommended settings for IRC Networks](#recommended-settings-for-irc-networks) * [Recommended settings for IRC Networks](#recommended-settings-for-irc-networks)
* [Freenode](#freenode) * [Freenode](#freenode)
* [IRCnet](#ircnet) * [IRCnet](#ircnet)
* [Other networks](#other-networks) * [Other networks](#other-networks)
* [Starting PBot](#starting-pbot) * [Starting PBot](#starting-pbot)
* [Usage](#usage) * [Usage](#usage)
* [Overriding directories](#overriding-directories) * [Overriding directories](#overriding-directories)
* [Overriding registry](#overriding-registry) * [Overriding registry](#overriding-registry)
* [Additional Configuration](#additional-configuration) * [Additional Configuration](#additional-configuration)
* [Adding Channels](#adding-channels) * [Adding Channels](#adding-channels)
* [Adding Admins](#adding-admins) * [Adding Admins](#adding-admins)
* [Loading Plugins](#loading-plugins) * [Loading Plugins](#loading-plugins)
* [Further Reading](#further-reading) * [Further Reading](#further-reading)
* [Commands](#commands) * [Commands](#commands)
* [Factoids](#factoids) * [Factoids](#factoids)
* [Modules](#modules) * [Modules](#modules)
<!-- md-toc-end --> <!-- md-toc-end -->
Installation ## Installation
------------
### Installing Perl ### Installing Perl
@ -70,8 +68,7 @@ The command to install with `git` is:
Alternatively, you may [download a ZIP archive](https://github.com/pragma-/pbot/archive/master.zip). Alternatively, you may [download a ZIP archive](https://github.com/pragma-/pbot/archive/master.zip).
First-time Configuration ## First-time Configuration
------------------------
After git-cloning (or unpacking the ZIP archive) you should have a directory named After git-cloning (or unpacking the ZIP archive) you should have a directory named
`pbot/` (or `pbot-master/`). It should contain at least these directories and files: `pbot/` (or `pbot-master/`). It should contain at least these directories and files:
@ -173,8 +170,7 @@ Other networks are untested. They should be very similiar to either Freenode or
recommended settings should suffice. If you have any issues, please [report them here](https://github.com/pragma-/pbot/issues) recommended settings should suffice. If you have any issues, please [report them here](https://github.com/pragma-/pbot/issues)
or in the `#pbot2` channel on the Freenode network. or in the `#pbot2` channel on the Freenode network.
Starting PBot ## Starting PBot
-------------
### Usage ### Usage
@ -193,8 +189,7 @@ saved to the `registry` file. You do not need to use the override every time you
$ pbot irc.botnick=coolbot irc.server=irc.freenode.net irc.port=6667 $ pbot irc.botnick=coolbot irc.server=irc.freenode.net irc.port=6667
Additional Configuration ## Additional Configuration
------------------------
Once you have launched PBot, you can type into the STDIN to execute commands within Once you have launched PBot, you can type into the STDIN to execute commands within
the bot. Alternatively you can launch your own IRC client and `/msg` PBot. the bot. Alternatively you can launch your own IRC client and `/msg` PBot.
@ -268,8 +263,7 @@ Currently loaded plugins may be listed with the `pluglist` command.
For more information, see the [Plugins documentation](Plugins.md). For more information, see the [Plugins documentation](Plugins.md).
Further Reading ## Further Reading
---------------
That should get you started. For further information about PBot, check out these topics. That should get you started. For further information about PBot, check out these topics.

View File

@ -1,15 +1,19 @@
Quotegrabs # Quotegrabs
----------
PBot can grab user messages and store/recall them for posterity.
<!-- md-toc-begin --> <!-- md-toc-begin -->
* [grab](#grab) * [About](#about)
* [getq](#getq) * [Commands](#commands)
* [rq](#rq) * [grab](#grab)
* [delq](#delq) * [getq](#getq)
* [rq](#rq)
* [delq](#delq)
<!-- md-toc-end --> <!-- md-toc-end -->
## About
PBot can grab user messages and store/recall them for posterity. This document
describes the Quotegrabs plugin.
## Commands
### grab ### grab
Grabs a message someone says, and adds it to the quotegrabs database. You may grab multiple nicks/messages in one quotegrab by separating the arguments with a plus sign (the nicks need not be different -- you can grab multiple messages by the same nick by specifying a different history for each grab). Grabs a message someone says, and adds it to the quotegrabs database. You may grab multiple nicks/messages in one quotegrab by separating the arguments with a plus sign (the nicks need not be different -- you can grab multiple messages by the same nick by specifying a different history for each grab).

View File

@ -1,5 +1,4 @@
Registry # Registry
========
<!-- md-toc-begin --> <!-- md-toc-begin -->
* [About](#about) * [About](#about)