README.md: improvements

This commit is contained in:
Pragmatic Software 2020-01-27 22:05:43 -08:00
parent 86daea145b
commit e40f598687
1 changed files with 4 additions and 12 deletions

View File

@ -167,7 +167,7 @@ For more information, see the [Code Factoid documentation](doc/Factoids.md#code)
PBot can dynamically load and unload Perl modules to alter its behavior. PBot can dynamically load and unload Perl modules to alter its behavior.
These are some of the plugins that PBot has, there are many more: These are some of the plugins that PBot has; there are many more:
Plugin | Description Plugin | Description
--- | --- --- | ---
@ -195,7 +195,7 @@ Plugin | Description
### Modules ### Modules
Modules are external command-line executable programs and scripts that can be Modules are external command-line executable programs and scripts that can be
loaded via PBot Factoids. loaded as PBot commands.
Suppose you have the [Qalculate!](https://qalculate.github.io/) command-line 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 program and you want to provide a PBot command for it. You can create a _very_ simple
@ -206,19 +206,11 @@ shell script containing:
And let's call it `qalc.sh` and put it in PBot's `modules/` directory. And let's call it `qalc.sh` and put it in PBot's `modules/` directory.
Then you can add the `qalc` factoid: Then you can load it with the [`load`](doc/Admin.md#load) command.
!factadd global qalc qalc.sh
And then set its `type` to `module`:
!factset global qalc type module
Alternatively you can simply use the [`load`](doc/Admin.md#load) command.
!load qalc qalc.sh !load qalc qalc.sh
Now you have a `qalc` calculator in PBot! Now you have a [Qalculate!](https://qalculate.github.io/) calculator in PBot!
<pragma-> !qalc 2 * 2 <pragma-> !qalc 2 * 2
<PBot> 2 * 2 = 4 <PBot> 2 * 2 = 4