"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
- Fixed itenlog erroneously disallowing negative arguments
- Removed badly behaving exact literal check
- Fixed 2 not being a prime number
- Fixed whitespace issues
- Reordered checks in evaluate_literal for speed and factored out the annoying QRPN_NOT_A_UNIT non-error error code
- Added a least significant digit to the definition of a year
PBot modules do not send the stderr stream to the channel. Instead, the output
is logged in <module-filename>-stderr, for private debugging purposes. PBot
expects output intended for channels to be on stdout.
This problem has previously been encountered. And my last solution was
not satisfactory.
It seems like there were 2 regex lines, one targeting `//` and another
targeting `/* */`.
Originally they were basically meant to perform this:
Search for
```c
;<COMMENT>;\n
```
and replacing it with
```c
;<COMMENT>
```
In e00ba2e62f I provided a patch to add
another `;` for `//` as it would eat the first `;` after the `<COMMENT>`
After thinking for some time, I came to the conclusion that the lines of
REGEX serve no purpose and should be removed.
For future reference:
e00ba2e62f was targeting this problem:
```c
printf("why is the last ; missing?"); // foo \n int a=42;
```
which generated something along the lines of
```c
printf("why is the last ; missing?");
// foo
int a = 42return 0;
```
Where it would strip a `;` from the first line after a `//` comment
And this commit additionally targeted:
```c
printf("foo\n");
//printf("bar\n");
printf("baz\n");
// only happens if the line ends with ; eg:
printf("hello\n");
// deny with ;
printf("world\n");
```
output:
foo
hello
expected:
foo
baz
hello
world
where it generated the code:
```c
printf("foo\n");
//printf("bar\n" );printf("baz\n" );
// only happens if the line ends with ; eg:
printf("hello\n");
// deny with ;printf("world\n" );
```
Thus this should fix#62 and the original problem
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.