3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-01 16:39:27 +01:00
Commit Graph

4 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
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
6ba7864474 Add missing PBot::Core::Factoids::* files 2021-07-26 21:46:20 -07:00