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. --- admin.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'admin.rb') diff --git a/admin.rb b/admin.rb index 61e454b..fceaa26 100644 --- a/admin.rb +++ b/admin.rb @@ -36,15 +36,15 @@ module Dinobot end def load(user, channel, argument) - argument.split.map do |x| - [:load_module, x.intern] - end + return unless is_admin?(user) + + argument.split.map { |x| [:load_module, x.intern] } end def unload(user, channel, argument) - argument.split.map do |x| - [:unload_module, x.intern] - end + return unless is_admin?(user) + + argument.split.map { |x| [:unload_module, x.intern] } end end end -- cgit v1.2.3-70-g09d2