aboutsummaryrefslogtreecommitdiff
path: root/admin.rb
diff options
context:
space:
mode:
Diffstat (limited to 'admin.rb')
-rw-r--r--admin.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/admin.rb b/admin.rb
index 3fc0338..61e454b 100644
--- a/admin.rb
+++ b/admin.rb
@@ -5,7 +5,7 @@ module Dinobot
def initialize
super
- @commands << :join << :part
+ @commands << :join << :part << :listadmins << :load << :unload
@admins = Array.new
end
@@ -30,5 +30,21 @@ module Dinobot
def part(user, channel, argument)
[[:part, argument]] if is_admin?(user)
end
+
+ def listadmins(user, channel, argument)
+ [[:say, channel, @admins.join(' ')]] if is_admin?(user)
+ end
+
+ def load(user, channel, argument)
+ argument.split.map do |x|
+ [:load_module, x.intern]
+ end
+ end
+
+ def unload(user, channel, argument)
+ argument.split.map do |x|
+ [:unload_module, x.intern]
+ end
+ end
end
end