From 81344c57f7ccba7bc1e4ef25c24f9ad832c64372 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 14 Apr 2014 16:24:40 -0700 Subject: Allow piping of commands (needs cleanup). --- test.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test.rb') diff --git a/test.rb b/test.rb index bc9db29..665c21e 100644 --- a/test.rb +++ b/test.rb @@ -5,7 +5,7 @@ module Dinobot def initialize super - @commands << :echo << :error << :timeout + @commands << :echo << :error << :timeout << :x3 << :wrongreturn end def echo(user, channel, argument) @@ -19,5 +19,13 @@ module Dinobot def timeout(user, channel, argument) sleep 60 end + + def x3(user, channel, argument) + [[:say, channel, argument]] * 3 + end + + def wrongreturn(user, channel, argument) + 0 + end end end -- cgit v1.2.3-70-g09d2