If the output from a code snippet is `0` without a newline,
Perl treats this as a false value. When Guest::process_command()
returns a false value, that signals to guest-server::serial_server()
that it is the parent returning and so it will not send the result back
to the host.
However, `0\n` is a true value. Solution: always append a final newline to
the guest output.
U+feff is now used instead of U+200b for nick-dehighlighting.
U+feff is non-breaking; it will not break-up the word when wrapping. It also
appears to be much more widely supported. In fact, some terminals will simply
strip the bytes -- this allows copying the text as-is, etc.
Additionally, an exclude-list was added to prevent dehighlighting of specific
nicknames. This is because several terminals do not fully support Unicode's
zero-width spaces -- they show up as plain spaces. Certain words for the #c
channel have been added to this exclude list since they are also somewhat
popular as nicknames there.
"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
For some reason, various IRC networks do not propagate banlist metadata
such as owner and timestamp when a server rejoins. This causes the
server's banlist entries to contain "set by server" instead of the
original individual who set it and "set on now" instead of when it was
originally set.
This commit modifies PBot's banlist monitoring to only update PBot's
internal banlist metadata when the ban doesn't exist or when the ban is
being updated by an actual individual instead of the server. Now PBot
will remember the original setter and the original timestamp
regardless of whether the IRC server can.
If ProcessManager::execute_process() returns undef,
then the loop in Interpreter::interpret() thinks that
the command didn't get handled, and so goes on to look
for other commands. This is now corrected.
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.
Bot output now appears in `recall` and can be `grab`bed.
Moved truncate_result() a bit further down to truncate after target nick
is prefixed to output.
The `factoid` commands interprets its arguments as an anonymous factoid.
Useful for testing factoid actions without creating and deleting them.
E.g.:
<pragma> !factoid /say $args[1:2] --args 'testing hello world args'
<PBot> hello world
dehighlight_nicks() was being invoked after truncate_result(), therefore
inserting \x200b zero-width space Unicode characters AFTER the message
was truncated.
Solution: moved dehighlight_nicks() to immediately preceding truncate_result().
Instead of "... [truncated; see http://xxx for full text.]" it more
concisely says "... <truncated; http://...>".
Increased irc.max_msg_len from a very conservative 425 to a more
generous 460. If you have very long channel names or nicknames, or if
you see things being truncated incorrectly, reduce this value.