diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-20 05:13:39 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-20 05:13:39 -0700 |
commit | d439860ebd6915fdd2f52f66cb032106e55c4777 (patch) | |
tree | f7f181c0c9518bc0fabdfc88db4f2bbe2705459c /module | |
parent | 912090fbaf4db492458f0e2aedc0181d3f39ccb3 (diff) | |
download | dinobot-d439860ebd6915fdd2f52f66cb032106e55c4777.tar.gz dinobot-d439860ebd6915fdd2f52f66cb032106e55c4777.tar.xz |
Add quit command and fix PONG message.
Diffstat (limited to 'module')
-rw-r--r-- | module/admin.rb | 8 |
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) |