From 0fee37a63b588d84b4d91e5ad5074ffb71f698a4 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 14 Apr 2014 14:57:03 -0700 Subject: Multithreading and timeout functionality. --- test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test.rb') diff --git a/test.rb b/test.rb index f2010a0..bc9db29 100644 --- a/test.rb +++ b/test.rb @@ -5,7 +5,7 @@ module Dinobot def initialize super - @commands << :echo << :error + @commands << :echo << :error << :timeout end def echo(user, channel, argument) @@ -15,5 +15,9 @@ module Dinobot def error(user, channel, argument) x end + + def timeout(user, channel, argument) + sleep 60 + end end end -- cgit v1.2.3-70-g09d2