From d439860ebd6915fdd2f52f66cb032106e55c4777 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sun, 20 Apr 2014 05:13:39 -0700 Subject: Add quit command and fix PONG message. --- module/admin.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'module') 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) -- cgit v1.2.3-70-g09d2