aboutsummaryrefslogtreecommitdiff
path: root/test.rb
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-04-15 07:03:13 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-04-15 07:03:13 -0700
commit9f44e1d9372e4168def6e90f6b49d61c74f0045d (patch)
tree02c8e7b9d901a60635776a56d61cb4e3d051d5aa /test.rb
parentb6d1cc2f13290970eb2fc0094c5d3f209d450d75 (diff)
downloaddinobot-9f44e1d9372e4168def6e90f6b49d61c74f0045d.tar.gz
dinobot-9f44e1d9372e4168def6e90f6b49d61c74f0045d.tar.xz
Refactor and clean up core code.
Diffstat (limited to 'test.rb')
-rw-r--r--test.rb23
1 files changed, 14 insertions, 9 deletions
diff --git a/test.rb b/test.rb
index a3a5a9a..e721104 100644
--- a/test.rb
+++ b/test.rb
@@ -5,13 +5,26 @@ module Dinobot
def initialize(bot)
super
- @commands << :echo << :error << :timeout << :x3 << :wrongreturn << :fooify
+ @commands << :echo << :ping << :x3 << :fooify
+ @commands << :error << :timeout << :wrongreturn
end
def echo(user, channel, argument)
[[:say, channel, argument]]
end
+ def ping(user, channel, argument)
+ [[:say, channel, 'pong']]
+ end
+
+ def x3(user, channel, argument)
+ [[:say, channel, argument]] * 3
+ end
+
+ def fooify(user, channel, argument)
+ [[:say, channel, 'foo' + argument]]
+ end
+
def error(user, channel, argument)
x
end
@@ -20,16 +33,8 @@ module Dinobot
sleep 60
end
- def x3(user, channel, argument)
- [[:say, channel, argument]] * 3
- end
-
def wrongreturn(user, channel, argument)
0
end
-
- def fooify(user, channel, argument)
- [[:say, channel, 'foo' + argument]]
- end
end
end