2020-01-12 19:23:32 +01:00
# Administrative
2019-12-24 02:30:57 +01:00
<!-- md - toc - begin -->
2020-01-22 03:24:16 +01:00
* [Logging in and out ](#logging-in-and-out )
* [login ](#login )
* [logout ](#logout )
* [Admin management commands ](#admin-management-commands )
* [adminadd ](#adminadd )
* [adminrem ](#adminrem )
* [Admin levels ](#admin-levels )
* [adminset ](#adminset )
* [adminunset ](#adminunset )
* [Admin metadata list ](#admin-metadata-list )
* [Listing admins ](#listing-admins )
* [Channel management commands ](#channel-management-commands )
* [join ](#join )
* [part ](#part )
* [chanadd ](#chanadd )
* [chanrem ](#chanrem )
* [chanset ](#chanset )
* [chanunset ](#chanunset )
* [chanlist ](#chanlist )
* [Channel metadata list ](#channel-metadata-list )
* [ignore ](#ignore )
* [unignore ](#unignore )
* [whitelist ](#whitelist )
* [blacklist ](#blacklist )
* [op ](#op )
* [deop ](#deop )
* [voice ](#voice )
* [devoice ](#devoice )
* [mode ](#mode )
* [ban/mute ](#banmute )
* [unban/unmute ](#unbanunmute )
* [invite ](#invite )
* [kick ](#kick )
* [Module management commands ](#module-management-commands )
* [load ](#load )
* [unload ](#unload )
2020-01-23 07:46:29 +01:00
* [Listing modules ](#listing-modules )
2020-01-22 03:24:16 +01:00
* [Plugin management commands ](#plugin-management-commands )
* [plug ](#plug )
* [unplug ](#unplug )
* [replug ](#replug )
* [pluglist ](#pluglist )
2020-01-23 07:15:35 +01:00
* [Command metadata commands ](#command-metadata-commands )
* [cmdset ](#cmdset )
* [cmdunset ](#cmdunset )
* [Command metadata list ](#command-metadata-list )
2020-01-22 03:24:16 +01:00
* [Miscellaneous commands ](#miscellaneous-commands )
* [export ](#export )
* [refresh ](#refresh )
* [reload ](#reload )
* [sl ](#sl )
* [die ](#die )
2019-12-24 02:30:57 +01:00
<!-- md - toc - end -->
2020-01-12 19:23:32 +01:00
## Logging in and out
2020-01-11 03:45:46 +01:00
You cannot use any of the admin commands unless you login. Note that login requires that your hostmask matches PBot's records.
2019-12-24 02:30:57 +01:00
2020-01-23 18:32:43 +01:00
However, if your admin account has the `autologin` [metadata ](#admin-metadata-list ) set to a true value then you will not need to login.
2020-01-12 19:23:32 +01:00
### login
2020-01-10 08:24:48 +01:00
Logs into PBot.
Usage: `login [channel] <password>`
2019-12-24 02:30:57 +01:00
2020-01-12 19:23:32 +01:00
### logout
2019-12-24 02:30:57 +01:00
Logs out of PBot.
2020-01-10 08:24:48 +01:00
Usage: `logout`
2020-01-12 19:23:32 +01:00
## Admin management commands
### adminadd
2020-01-10 08:24:48 +01:00
Adds a new admin to PBot.
2019-12-24 02:30:57 +01:00
Usage: `adminadd <name> <channel> <hostmask> <level> <password>`
2020-01-10 08:24:48 +01:00
Parameter | Description
--- | ---
`<name>` | A unique name to identify this account (usually the `nick` of the admin, but can be any identifier).
`<channel>` | Which channel the admin can administrate; use `global` for all channels. This field cannot be changed without removing and re-adding the admin.
`<hostmask>` | What hostmask the admin is recognized/allowed to login from (e.g., `somenick!*@*somedomain.com` or `*@unaffiliated/someuser` ). This field cannot be changed without removing and re-adding the admin.
2020-01-23 07:24:26 +01:00
`<level>` | An integer representing the admin's level of privileges. See [admin-levels ](#admin-levels ).
2020-01-23 18:32:43 +01:00
`<password>` | The password the admin will use to login (from /msg!). A password is not required if the `autologin` [metadata ](#admin-metadata-list ) is set for the admin; however, a dummy password still needs to be set.
2019-12-24 02:30:57 +01:00
2020-01-12 19:23:32 +01:00
### adminrem
2020-01-10 08:24:48 +01:00
Removes an admin from PBot. You can use the name field or the hostmask field that was set via `adminadd` .
2019-12-24 02:30:57 +01:00
2020-01-11 03:52:06 +01:00
Usage: `adminrem <channel> <name or hostmask>`
2019-12-24 02:30:57 +01:00
2020-01-12 20:01:26 +01:00
#### Admin levels
2019-12-24 02:30:57 +01:00
This is a list of admin commands allowed by each admin level. Higher level admins have access to all lower level admin commands.
2020-01-23 07:15:35 +01:00
Note that you can use [`cmdset` ](#cmdset ) to adjust any command's admin level.
2020-01-10 08:24:48 +01:00
Level | Commands
--- | ---
2020-01-12 03:57:37 +01:00
10 | actiontrigger, antispam, whitelist, blacklist, chanlist, ban, unban, mute, unmute, op, deop, voice, devoice, invite, kick, ignore, unignore
40 | chanset, chanunset, chanadd, chanrem, join, part, mode
60 | adminadd, adminrem, adminset, adminunset, akalink, akaunlink, regset, regunset, regsetmeta, regunsetmeta, regchange, dumpbans
90 | sl, plug, unplug, replug, load, unload, reload, export, rebuildaliases, refresh, die
99 | eval
2019-12-24 02:30:57 +01:00
2020-01-12 19:23:32 +01:00
### adminset
2020-01-10 08:24:48 +01:00
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 ).
2019-12-24 02:30:57 +01:00
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` .
2020-01-11 03:52:06 +01:00
Usage: `adminset <channel> <name or hostmask> [<key> [value]]`
2019-12-24 02:30:57 +01:00
2020-01-12 19:23:32 +01:00
### adminunset
2020-01-10 08:24:48 +01:00
Deletes a metadata key from an admin account. You can use the name `field` or the `hostmask` field that was set via adminadd.
2019-12-24 02:30:57 +01:00
2020-01-11 03:52:06 +01:00
Usage: `adminunset <channel> <name or hostmask> <key>`
2019-12-24 02:30:57 +01:00
2020-01-12 20:01:26 +01:00
#### Admin metadata list
2020-01-10 08:24:48 +01:00
This is a list of recognized metadata keys for admin accounts.
Name | Description
--- | ---
`name` | A unique name identifying this admin account.
`level` | The privilege level of the admin. See [admin levels ](#admin-levels ).
`password` | The password for this admin account.
`loggedin` | Whether the admin is logged in or not.
`stayloggedin` | Do not log the admin out when they part/quit.
2020-01-23 01:01:11 +01:00
`autologin` | Automatically log the admin in when they join the channel. Make sure the admin's hostmask wildcards are minimal.
`autoop` | Automatically give the admin operator status when they join the channel. Make sure the admin's hostmask wildcards are minimal.
`autovoice` | Automatically give the admin voiced status when they join the channel. Make sure the admin's hostmask wildcards are minimal.
2020-01-10 08:24:48 +01:00
2020-01-12 19:23:32 +01:00
### Listing admins
2020-01-12 04:11:32 +01:00
To list admins, use the `list admins` command. This is not an admin command, but
it is included here for completeness.
Usage: `list admins`
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
all channels, including global admins.
2020-01-12 19:23:32 +01:00
## Channel management commands
2020-01-10 08:24:48 +01:00
2020-01-12 19:23:32 +01:00
### join
2020-01-10 08:24:48 +01:00
To temporarily join a channel, use the `join` command. The channels may be a comma-
separated list.
Usage: `join <channel(s)>`
2020-01-12 19:23:32 +01:00
### part
2020-01-10 08:24:48 +01:00
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
list.
Usage `part <channel(s)>`
2020-01-12 19:23:32 +01:00
### chanadd
2020-01-10 08:24:48 +01:00
`chanadd` permanently adds a channel to PBot's list of channels to auto-join and manage.
Usage: `chanadd <channel>`
2020-01-12 19:23:32 +01:00
### chanrem
2020-01-10 08:24:48 +01:00
`chanrem` removes a channel from PBot's list of channels to auto-join and manage.
Usage: `chanrem <channel>`
2020-01-12 19:23:32 +01:00
### chanset
2020-01-10 08:24:48 +01:00
`chanset` sets a channel's metadata. See [channel metadata list ](#channel-metadata-list )
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.
2020-01-12 19:23:32 +01:00
### chanunset
2020-01-10 08:24:48 +01:00
`chanunset` deletes a channel's metadata key.
Usage: `chanunset <channel> <key>`
2020-01-12 19:23:32 +01:00
### chanlist
2020-01-10 08:24:48 +01:00
`chanlist` lists all added channels and their metadata keys and values.
2020-01-12 20:01:26 +01:00
#### Channel metadata list
2020-01-10 08:24:48 +01:00
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).
`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.
2020-01-12 19:23:32 +01:00
### ignore
2020-01-10 08:24:48 +01:00
Ignore a user. If you omit `[channel]` PBot will ignore the user in all channels, including private messages.
2019-12-24 02:30:57 +01:00
Usage: `ignore <hostmask regex> [channel [timeout]]`
2020-01-12 07:00:35 +01:00
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.
2019-12-24 02:30:57 +01:00
2020-01-12 19:23:32 +01:00
### unignore
2020-01-10 08:24:48 +01:00
Unignores a user. If you omit `[channel]` PBot will unignore the user from all channels, including private messages.
2019-12-24 02:30:57 +01:00
Usage: `unignore <hostmask regex> [channel]`
2020-01-12 19:23:32 +01:00
### whitelist
2020-01-10 08:24:48 +01:00
Whitelists a hostmask regex to be exempt from ban evasions or anti-flood enforcement.
2019-12-24 02:30:57 +01:00
Usages:
- `whitelist <show/list>`
- `whitelist add <channel> <hostmask>`
- `whitelist remove <channel> <hostmask>`
2020-01-12 19:23:32 +01:00
### blacklist
2019-12-24 02:30:57 +01:00
Blacklists a hostmask regex from joining a channel.
Usages:
- `blacklist <show/list>`
- `blacklist add <hostmask regex> [channel]`
- `blacklist remove <hostmask regex> [channel]`
2020-01-12 19:23:32 +01:00
### op
### deop
### voice
### devoice
2020-01-12 03:38:43 +01:00
The `op` , `deop` , `voice` and `devoice` commands all perform their respective named action.
2020-01-12 03:29:51 +01:00
The `targets` parameter can be a list of multiple nicks, optionally containing
wildcards. If `targets` is omitted, the action will be performed on the caller.
Usages:
In channel:
* `op [targets]`
* `deop [targets]`
* `voice [targets]`
* `devoice [targets]`
From private message:
* `op <channel> [targets]`
* `deop <channel> [targets]`
* `voice <channel> [targets]`
* `devoice <channel> [targets]`
2020-01-12 19:23:32 +01:00
### mode
2020-01-10 08:24:48 +01:00
Sets or unsets channel or user modes.
2020-01-12 03:29:51 +01:00
Usage: `mode [channel] <flags> [targets]`
2020-01-10 08:24:48 +01:00
2020-01-12 03:29:51 +01:00
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
can do `!mode +o *|dev` in a channel.
2020-01-10 08:24:48 +01:00
2020-01-12 19:23:32 +01:00
### ban/mute
2020-01-10 08:51:53 +01:00
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.
2019-12-24 02:30:57 +01:00
2020-01-10 08:45:47 +01:00
Usages:
- `ban <nick or hostmask> [channel [timeout]]`
- `mute <nick or hostmask> [channel [timeout]]`
2019-12-24 02:30:57 +01:00
2020-01-12 07:00:35 +01:00
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.
2019-12-24 02:30:57 +01:00
2020-01-12 19:23:32 +01:00
### unban/unmute
2020-01-10 08:51:53 +01:00
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.
2019-12-24 02:30:57 +01:00
2020-01-10 08:45:47 +01:00
Usages:
- `unban <nick or hostmask> [channel]`
- `unmute <nick or hostmask> [channel]`
2019-12-24 02:30:57 +01:00
2020-01-12 19:23:32 +01:00
### invite
2020-01-12 03:29:51 +01:00
Invites a user to a channel.
Usage: `invite [channel] <nick>`
2020-01-12 19:23:32 +01:00
### kick
2020-01-10 08:51:53 +01:00
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.
2019-12-24 02:30:57 +01:00
Usage from channel: `kick <nick> [reason]`
From private message: `kick <channel> <nick> [reason]`
2020-01-12 19:23:32 +01:00
## Module management commands
2020-01-12 04:11:32 +01:00
Note that modules are "reloaded" each time they are executed. There is no need to `refresh` after editing a module.
2020-01-12 19:23:32 +01:00
### load
2020-01-12 04:11:32 +01:00
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` .
Usage: `load <keyword> <module>`
For example, to load `$data_dir/modules/qalc.sh` as the `qalc` command:
< pragma- > !load qalc qalc.sh
2020-01-12 19:23:32 +01:00
### unload
2020-01-12 04:11:32 +01:00
This command unloads a module. It is equivalent to deleting the factoid keyword
the module was loaded as.
Usage: `unload <keyword>`
2020-01-23 07:46:29 +01:00
### Listing modules
2020-01-23 07:48:40 +01:00
To list the loaded modules, use the `list modules` command. This is not an admin command, but
2020-01-23 07:46:29 +01:00
it is included here for completeness.
Usage: `list modules`
2020-01-12 19:23:32 +01:00
## Plugin management commands
2020-01-12 04:11:32 +01:00
2020-01-12 19:23:32 +01:00
### plug
2020-01-12 04:11:32 +01:00
Loads a plugin into PBot.
Usage: `plug <plugin>`
2020-01-12 19:23:32 +01:00
### unplug
2020-01-12 04:11:32 +01:00
Unloads a plugin from PBot.
Usage: `unplug <plugin>`
2020-01-12 19:23:32 +01:00
### replug
2020-01-12 04:11:32 +01:00
Reloads a plugin into PBot. The plugin is first unloaded and then it is loaded again.
Usage: `replug <plugin>`
2020-01-12 19:23:32 +01:00
### pluglist
2020-01-12 04:11:32 +01:00
Lists all currently loaded plugins. This isn't an admin command, but it is included here for completeness.
Usage: `pluglist`
< pragma- > !pluglist
< PBot > Loaded plugins: ActionTrigger, AntiAway, AntiKickAutoRejoin, AntiNickSpam, AntiRepeat, AntiTwitter, AutoRejoin, GoogleSearch, Quotegrabs, RemindMe, UrlTitles
2020-01-23 07:15:35 +01:00
## Command metadata commands
### cmdset
Use `cmdset` to set various [metadata ](#command-metadata-list ) for built-in commands.
Usage: `cmdset <command> [key [value]]`
2020-01-23 07:27:01 +01:00
Omit `<key>` and `<value>` to list all the keys and values for a command. Specify `<key>` , but omit `<value>` to see the value for a specific key.
2020-01-23 07:15:35 +01:00
### cmdunset
Use `cmdset` to delete various [metadata ](#command-metadata-list ) from built-in commands.
Usage: `cmdunset <command> <key>`
### Command metadata list
Name | Description
--- | ---
`help` | The text to display for the [`help` ](Commands.md#help ) command.
`level` | The admin level of this command. See also [admin-levels ](#admin-levels )
2020-01-12 19:23:32 +01:00
## Miscellaneous commands
2019-12-24 02:30:57 +01:00
2020-01-10 08:24:48 +01:00
These are some of the miscellaneous admin commands that have not been covered
above or in the rest of the PBot documentation.
2019-12-24 02:30:57 +01:00
2020-01-12 19:23:32 +01:00
### export
2020-01-10 08:24:48 +01:00
Exports specified list to HTML file in `$data_dir` .
Usage: `export <factoids|quotegrabs>`
2020-01-12 19:23:32 +01:00
### refresh
2019-12-24 02:30:57 +01:00
Refreshes/reloads PBot core modules and plugins (not the command-line modules since those are executed/loaded each time they are invoked).
2020-01-12 19:23:32 +01:00
### reload
2020-01-10 08:24:48 +01:00
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
modifications.
Usage `reload <admins|bantimeouts|blacklist|channels|factoids|funcs|ignores|mutetimeouts|registry|whitelist>`
2020-01-12 19:23:32 +01:00
### sl
2020-01-23 07:30:48 +01:00
Sends a raw IRC command to the server. Use the `sl` command when
2020-01-10 08:24:48 +01:00
PBot does not have a built-in command to do what you need.
2019-12-24 02:30:57 +01:00
2020-01-10 08:24:48 +01:00
Usage: `sl <irc command>`
2019-12-24 02:30:57 +01:00
< pragma- > sl PRIVMSG #channel :Test message
< PBot > Test message
2020-01-12 19:23:32 +01:00
### die
2020-01-10 08:24:48 +01:00
Tells PBot to disconnect and exit.
2019-12-24 02:30:57 +01:00