3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-28 14:59:56 +01:00
Commit Graph

51 Commits

Author SHA1 Message Date
Pragmatic Software
001f2024c4
Factoids: add default value modifier
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
2024-11-27 12:17:45 -08:00
Pragmatic Software
828892726d
doc/Factoids.md: Fix typo 2024-11-07 02:41:07 -08:00
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
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
4345b0a75c
Core/Factoids: update edit-by when factadd -f; add edited to top20 2024-10-23 21:36:21 -07:00
Pragmatic Software
a98a0fa0fb Fix links 2022-03-26 21:05:58 -07:00
Pragmatic Software
3d97dc2c33 Rename "modules" to "applets"
"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
2021-11-19 18:05:50 -08:00
Pragmatic Software
24496ef790 doc/Factoids.md: document :weight(n) 2020-06-18 22:16:56 -07:00
Pragmatic Software
65f7c41708 doc/Factoids: expansion modifiers may contain spaces now 2020-06-05 19:05:50 -07:00
Pragmatic Software
e05f6fb6c0 doc/Factoids.md: add :join() to expansion-modifiers 2020-06-04 20:31:51 -07:00
Pragmatic Software
0bd53cfd87 doc/Factoids.md: improve expansion-modifiers section 2020-06-03 01:15:35 -07:00
Pragmatic Software
5d10836dd3 doc/Factoids.md: update 2020-06-03 01:10:26 -07:00
Pragmatic Software
899d6d79c6 doc/Factoids: link to Selectors 2020-06-02 23:46:19 -07:00
Pragmatic Software
037c1398dd doc/Factoids.md: add "Selectors" to expansion-modifiers section 2020-06-02 23:45:38 -07:00
Pragmatic Software
243575cc5a doc/Factoids.md: document pick_unique(x) 2020-06-01 18:30:50 -07:00
Pragmatic Software
02062ed81a doc/Factoids.md: add some more info 2020-06-01 17:18:10 -07:00
Pragmatic Software
12f17d623e doc/Factoids.md: document new expansion modifiers 2020-06-01 17:11:48 -07:00
Pragmatic Software
0fb66c506e doc/Factoids.md: lowercase "Metadata" 2020-02-04 02:35:47 -08:00
Pragmatic Software
3dcaf8a9fc doc/Factoids.md: update for user-capabilities 2020-02-04 02:28:05 -08:00
Pragmatic Software
61ad481589 doc: fix grammar 2020-01-23 09:27:52 -08:00
Pragmatic Software
75ff9b6d14 doc/Factoids.md: move "Channel namespaces" section 2020-01-22 19:28:42 -08:00
Pragmatic Software
91d01bb9e2 doc/Factoids.md: minor grammar fix and improvement 2020-01-22 17:53:22 -08:00
Pragmatic Software
44dd840d59 doc/Factoids.md: improvements 2020-01-22 11:25:28 -08:00
Pragmatic Software
def064d7f2 doc/Factoids.md: factchange can take a -url option 2020-01-22 11:19:56 -08:00
Pragmatic Software
345dd0930b doc/Factoids.md: improvements 2020-01-22 11:08:40 -08:00
Pragmatic Software
aac9230882 doc/Factoids.md: add some missing metadata 2020-01-21 19:09:08 -08:00
Pragmatic Software
eb0ac10cdc doc/Factoids.md: minor improvement 2020-01-21 18:34:28 -08:00
Pragmatic Software
37ce15cf31 doc/Factoids.md: update metadata list 2020-01-21 18:29:58 -08:00
Pragmatic Software
52be2c6de8 doc: update TOCs and misc improvements 2020-01-21 18:24:16 -08:00
Pragmatic Software
eb9acbf863 doc/Factoids.md: improve "formatting lengthy code factoids" section 2020-01-14 15:08:50 -08:00
Pragmatic Software
1f3bf44f6c doc: update TOC headers 2020-01-12 10:23:32 -08:00
Pragmatic Software
ccdf66f357 doc/Factoids.md: minor edit 2020-01-11 20:45:34 -08:00
Pragmatic Software
1387b2f60a doc/Factoids.md: document the -p option to factshow 2020-01-11 20:42:36 -08:00
Pragmatic Software
80df40e3a2 doc/Factoids.md: document -f and -url in factadd 2020-01-11 20:35:16 -08:00
Pragmatic Software
4d4da9256f doc/Factoids.md: rename section "modifiers" -> "Expansion modifiers" 2020-01-11 19:41:35 -08:00
Pragmatic Software
f2a2d27458 doc/Factoids.md: fix link 2020-01-11 14:37:26 -08:00
Pragmatic Software
40fb8f7aa8 doc/Factoids.md: make it clearer that user has to install virtual machine 2020-01-10 16:28:11 -08:00
Pragmatic Software
1364142693 doc/Factoids.md: add "About" section 2020-01-10 16:14:31 -08:00
Pragmatic Software
c62f2f80f1 doc/Factoids.md: clarity 2020-01-09 11:50:20 -08:00
Pragmatic Software
e5131c1aaa doc/Factoids.md: Change "LUA" to "Lua" 2020-01-09 10:59:38 -08:00
Pragmatic Software
e166ed1e46 doc/Factoids.md: improvement to mock section 2020-01-08 22:33:56 -08:00
Pragmatic Software
262e79ad70 doc/Factoids.md: make examples much easier to read; add mock 2020-01-08 22:28:24 -08:00
Pragmatic Software
c8cd831fe1 doc/Factoids.md: very minor edits 2020-01-08 22:10:40 -08:00
Pragmatic Software
88f1f6dadd doc/Factoids.md: fix TOC; minor edits 2020-01-08 21:08:45 -08:00
Pragmatic Software
8c82b8dbe1 doc/Factoids.md: minor edit 2020-01-08 20:40:51 -08:00
Pragmatic Software
18a3752d38 doc/Factoids.md: minor edit 2020-01-08 20:38:24 -08:00
Pragmatic Software
ebf6ccb6fa doc/Factoids.md: update TOC and add code factoid languages 2020-01-08 20:30:52 -08:00
Pragmatic Software
ac0c9505f1 doc/Factoids.md: add /code section describing Code Factoids 2020-01-08 20:07:24 -08:00
Pragmatic Software
40d6546491 doc/Factoids.md: minor improvements 2020-01-08 04:45:07 -08:00
Pragmatic Software
da586de223 doc/Factoids.md: many improvements 2020-01-08 04:26:08 -08:00