diff options
author | Zoffix Znet <cpan@zoffix.com> | 2015-12-06 18:07:19 -0500 |
---|---|---|
committer | Zoffix Znet <cpan@zoffix.com> | 2015-12-06 18:07:19 -0500 |
commit | d2da9fcd250533bee5df17bd182648a8cea0d7b0 (patch) | |
tree | fca0431ce3639d5a2ac85a69c4fe9f05717be789 /lib/IRC/Client/Plugin/PingPong.pm6 | |
parent | ba793ec6d1d4c66300f40cbced25f9ffd23ec792 (diff) |
Prerelease
Diffstat (limited to 'lib/IRC/Client/Plugin/PingPong.pm6')
-rw-r--r-- | lib/IRC/Client/Plugin/PingPong.pm6 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/IRC/Client/Plugin/PingPong.pm6 b/lib/IRC/Client/Plugin/PingPong.pm6 new file mode 100644 index 0000000..7ba977d --- /dev/null +++ b/lib/IRC/Client/Plugin/PingPong.pm6 @@ -0,0 +1,10 @@ +use v6; +unit class IRC::Client::Plugin::PingPong:ver<1.001001>; + +multi method msg () { True } +multi method msg ($irc, $msg) { + return unless $msg<command> eq 'PING'; + my $res = "PONG {$irc.nick} $msg<params>[0]"; + $irc.debug and say $res; + $irc.ssay($res); +} |