3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-28 23:09:39 +01:00
Commit Graph

21 Commits

Author SHA1 Message Date
Pragmatic Software
a262139fd2
Factoids: require locked to be exactly 1 to invoke commands with required_caps
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.
2024-11-07 01:45:15 -08:00
Pragmatic Software
650bf40a24
Disallow invoking of commands with requires_cap from unlocked factoids
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.
2024-11-05 16:48:59 -08:00
Pragmatic Software
9ebc77f4da
Replace preserve_whitespace metadata with condense-whitespace
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.
2024-11-04 00:25:36 -08:00
Pragmatic Software
af2d9844b8
Interpreter: allow processing of empty result
This fixes .e.g.:

    <pragma-> !echo foo &{echo bar | { sed s/bar// }} baz

such that it produces the output "foo  baz" instead of no output at all.
2024-11-02 17:53:37 -07:00
Pragmatic Software
755d7bd6c0
Bug fixes
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
2024-10-22 09:50:10 -07:00
Pragmatic Software
7ddb32ea16 Update core to use subroutine signatures 2023-04-13 21:04:12 -07:00
Pragmatic Software
8d5b992b4c Update copyright 2023-02-20 21:31:52 -08:00
Pragmatic Software
a170b28a8b Factoids: fix behavior of factoid look-up 2022-07-05 23:12:12 -07:00
Pragmatic Software
3fc39c9359 Core/Commands: remove(): fix arguments passed to unregister() 2021-08-06 11:14:40 -07:00
Pragmatic Software
17e78cd7fc Commands: add(): improve named-parameter validation 2021-07-31 12:04:50 -07:00
Pragmatic Software
5aeb608052 Commands: fix minor typos in comments 2021-07-30 19:50:30 -07:00
Pragmatic Software
926d57990b Support named-parameters in command registration
- convert several plugins to use named-parameters
- misc clean-ups in unrelated files
2021-07-30 19:01:24 -07:00
Pragmatic Software
62a477b7c4 Fix rare case where dont-replace-pronouns was ignored 2021-07-27 23:25:38 -07:00
Pragmatic Software
59140d4096 Remove add_nick mess from ProcessManager 2021-07-27 21:27:03 -07:00
Pragmatic Software
c75be8b4b0 Refactor PBot::Core::Factoids into PBot::Core::Factoids::* 2021-07-26 21:39:44 -07:00
Pragmatic Software
7b703ccffe Move Storage and Utils into Core 2021-07-23 19:22:25 -07:00
Pragmatic Software
1b15ba615b Commands: insignificant refactor to remove an extra line 2021-07-23 18:37:45 -07:00
Pragmatic Software
6fd4245b2e Commands now stored as hash table 2021-07-23 18:26:07 -07:00
Pragmatic Software
b990d482c1 Rename LoadPackages to LoadModules 2021-07-22 05:36:46 -07:00
Pragmatic Software
dfda37227d Refactor Utils::LoadPackages to use @INC 2021-07-22 05:09:07 -07:00
Pragmatic Software
f0e617fef7 Move core packages into PBot/Core 2021-07-20 22:44:51 -07:00