diff options
Diffstat (limited to 'examples/02-trickster-bot.p6')
-rw-r--r-- | examples/02-trickster-bot.p6 | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/examples/02-trickster-bot.p6 b/examples/02-trickster-bot.p6 deleted file mode 100644 index 64171a7..0000000 --- a/examples/02-trickster-bot.p6 +++ /dev/null @@ -1,20 +0,0 @@ -use lib <lib>; - -use IRC::Client; -class Trickster { - multi method irc-to-me ($ where /time/) { DateTime.now } - multi method irc-to-me ($ where /temp \s+ $<temp>=\d+ $<unit>=[F|C]/) { - $<unit> eq 'F' ?? "That's {($<temp> - 32) × .5556}°C" - !! "That's { $<temp> × 1.8 + 32 }°F" - } -} - -class BFF { method irc-to-me ($ where /'♥'/) { 'I ♥ YOU!' } } - -.run with IRC::Client.new: - :nick<MahBot> - :alias('foo', /b.r/) - :host(%*ENV<IRC_CLIENT_HOST> // 'irc.freenode.net') - :channels<#zofbot> - :debug - :plugins(Trickster, BFF) |