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.
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.
This was way overdue. User passwords are no longer stored as cleartext.
When PBot is restarted after applying this commit, all stored passwords will
be converted to salted hash digests.
The `useradd`, `userset` and `my` commands will now hash passwords.
Why did it take me so long to finally get around to hashing passwords
properly, you might ask. The reason why this wasn't done sooner is because
all of my users used hostmask-based `autologin`. The passwords that PBot
randomly generated were ignored and never used.
I do regret that it took me so long to get around to this, for those of you
who might be using custom passwords instead of hostmask-based `autologin`.
* replace heartbeat with health-check
* instead of steady stream of newlines every 5s, now awaits input
and responds with `vmstat` output
* more reliably use host/config/vm-exec.json to get libvirt domain name
for snapshot-revert, server address, serial ports, vagrant setting, etc
* use iptables/nftables to disable networking
* added guest/bin/disable-network-[iptables,nftables]
* added guest/bin/enable-network-[iptables,nftables]
* replace ugly ___OUTPUT___ texts in sh, bash, ksh, zsh languages
* documentation updates and tweaks
VM socket communication is superior to VM serial communication in
every way. Unfortunately at this time only Linux supports them.
Fortunately, that's 99% of PBot's userbase.
If you're not using Linux or if you're using an older Linux that
does not support VM sockets, the PBot VM scripts will gracefully
fallback to using the serial connection. You may explicitly
disable VM socket connection attempts by setting PBOTVM_CID=0.