This fixes e.g.:
<pragma-> ,{echo foo ;;; echo bar} ,{echo baz}
<PBot> foo bar
<PBot> foo baz
To instead produce the expected:
<PBot> foo bar
<PBot> baz
This preserves the pipe/cmd-substitution/etc to allow post-processing
of the `date` output.
Interpreter: Reset `interpreted` contextual metadata when handling
result to allow recursion for continued command processing.
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.
* func sed no longer trims leading whitespace
* quoted text no longer trims leading whitespace
* no longer convert tabs to spaces in output
* no longer condense adjacent whitespace together in output
E.g.:
<pragma-> show testcargs
<PBot> [global] testcargs: /code c11 printf("/say args: " ); while (*++argv) printf("[%s] " , *argv);
<pragma-> testcargs 'hello''world' 'how are 'you today
<PBot> args: [helloworld] [how are you] [today]
Previously, adjacent 'foo''bar' would end up as 2 args like [foo] [bar]. Now
they are properly concatenated into one [foobar] argument.
This also fixes the cases of whitespace being inserted after quoted arguments.
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
* obtain bot nick from connection details instead of registry where appropriate
* irc.random_nick works again
* record own hostmask when connecting
* fix web-paste truncation by subtracting length of own hostmask from message length
* set irc.max_msg_len back to 510
* updated IRC numeric 378 to whoishost
* add sprunge.us to WebPaste
PBot now finally supports IRCv3 message tags. The `account-tag`
capability is now enabled for improved NickServ account tracking.
Refactored CAP negotiation. Minor clean-ups in AntiFlood.pm (which ought to
be completely rewritten from the ground-up).
Misc clean-ups and refactoring of various things.
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.
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.
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.
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.