diff options
author | Zoffix Znet <cpan@zoffix.com> | 2016-07-24 16:20:12 -0400 |
---|---|---|
committer | Zoffix Znet <cpan@zoffix.com> | 2016-07-24 16:20:12 -0400 |
commit | 18615cc9bb33801fbde2716513071e7b32af2ab2 (patch) | |
tree | 167784d2089a4e05cfb114e5a3520efc28bf9ecb /examples | |
parent | effaced84ec8df42e60b89426f5fc644cb907285 (diff) |
moar work
Diffstat (limited to 'examples')
-rw-r--r-- | examples/bot.pl6 | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/bot.pl6 b/examples/bot.pl6 index 47b7149..e991a8e 100644 --- a/examples/bot.pl6 +++ b/examples/bot.pl6 @@ -1,17 +1,15 @@ use lib 'lib'; use IRC::Client; -use IRC::Client::Plugin; class MyPlug does IRC::Client::Plugin { - method irc-privmsg-channel ($msg) { - return $.IRC_NOT_HANDLED unless $msg.text ~~ /^'say' \s+ $<cmd>=(.+)/; + method irc-privmsg-channel ($msg where .text ~~ /^'say' \s+ $<cmd>=(.+)/ ) { $msg.reply: "How about: $<cmd>.uc()"; } } my $irc = IRC::Client.new( - :nick('IRCBot' ~ now.Int) - :debug<1> + :nick('IRCBot') + :debug<2> :channels<#perl6 #perl7> # :host<irc.freenode.net> :port<6667> |