From 18615cc9bb33801fbde2716513071e7b32af2ab2 Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Sun, 24 Jul 2016 16:20:12 -0400 Subject: moar work --- examples/bot.pl6 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'examples') 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+ $=(.+)/; + method irc-privmsg-channel ($msg where .text ~~ /^'say' \s+ $=(.+)/ ) { $msg.reply: "How about: $.uc()"; } } my $irc = IRC::Client.new( - :nick('IRCBot' ~ now.Int) - :debug<1> + :nick('IRCBot') + :debug<2> :channels<#perl6 #perl7> # :host :port<6667> -- cgit v1.1