aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-04-20 05:13:39 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-04-20 05:13:39 -0700
commitd439860ebd6915fdd2f52f66cb032106e55c4777 (patch)
treef7f181c0c9518bc0fabdfc88db4f2bbe2705459c /module
parent912090fbaf4db492458f0e2aedc0181d3f39ccb3 (diff)
downloaddinobot-d439860ebd6915fdd2f52f66cb032106e55c4777.tar.gz
dinobot-d439860ebd6915fdd2f52f66cb032106e55c4777.tar.xz
Add quit command and fix PONG message.
Diffstat (limited to 'module')
-rw-r--r--module/admin.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/module/admin.rb b/module/admin.rb
index d59fd49..dd52cab 100644
--- a/module/admin.rb
+++ b/module/admin.rb
@@ -6,7 +6,7 @@ module Dinobot
def initialize(bot)
super
- @commands << :join << :part << :load << :unload
+ @commands << :join << :part << :quit << :load << :unload
@commands << :listadmins << :listmodules << :listchannels
@admins = Array.new
@@ -37,6 +37,12 @@ module Dinobot
[[:part, argument.strip]]
end
+ def quit(user, channel, argument)
+ return unless is_admin?(user)
+
+ [[:quit, argument ? argument.strip : 'Quitting.']]
+ end
+
def listadmins(user, channel, argument)
return unless is_admin?(user)