Uses POSIX shell parameter expansion syntax.
<pragma-> !factadd cookie /me gives a cookie to ${args:-nobody. What a shame}!
<PBot> cookie added to the global channel.
<pragma-> !cookie Bob
* PBot gives a cookie to Bob!
<pragma-> !cookie
* PBot gives a cookie to nobody. What a shame!
<pragma-> !factadd sum /call calc $arg[0]:-1 + $arg[1]:-2
<PBot> sum added to the global channel.
<pragma-> !sum
<PBot> 1 + 2 = 3
<pragma-> !sum 3
<PBot> 3 + 2 = 5
<pragma-> !sum 4 6
<PBot> 4 + 6 = 10
This allows us to set `locked` to a value greater than `1` to lock a factoid WITHOUT
allowing invocation of `required_caps` commands. This lets us safely lock a factoid
that has unrestrained `$args` or variables.
As a security measure to prevent users from creating or modifying factoids to
sneak in commands to trick chanops/admins/botowners/etc into executing those
commands, the command interpreter will now check if the command has been
invoked in the context of a factoid. If so, the factoid must be locked.
PBot now preserves whitespace by default. The `preserve_whitespace`
metadata field is now redundant. It has now been replaced with
`condense-whitespace`, which when set to a true value will collapse
adjacent whitespace to a single space.
general.debugcontext: filter out cmdlist and arglist
Core/Applets: log applet start/stop and duration
Core/ProcessManager: fix potential race-condition with $context object
Core/Interpreter:
* expand pronouns before command-substitution
* attempt to find current channel's factoid instance for metadata
* remove duplication of command history in command-substition
* terminate pipe/substitution processing when protecting self
Core/Factoids: limit -url contents to 250kb
"Applet" is a much better name for the external command-line
scripts and programs that can be loaded as PBot commands. They
will no longer be confused with Perl modules.
https://en.wikipedia.org/wiki/Applet
Text::Levenshtein::XS is much, much, much, much faster and more
efficient.
Existing PBot users: Please run `cpanm Text::Levenshtein::XS` to install this
module.
- add more comments to VERSION.pm
- minor clean up of logging messages
- minor refactoring
- VERSION.pm will no longer be updated as its own distinct commit