diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-21 14:17:44 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-21 14:17:44 -0700 |
commit | ed04bd3c0fff100f40ed45d300fcb152723226ef (patch) | |
tree | be80f6bc8370126e899a7b53be6fa319a3b1c2af /module/admin.rb | |
parent | 8fd8c27562184a18000d32d96921fbb0ca8045be (diff) | |
download | dinobot-ed04bd3c0fff100f40ed45d300fcb152723226ef.tar.gz dinobot-ed04bd3c0fff100f40ed45d300fcb152723226ef.tar.xz |
Move response validation out of main code.
Diffstat (limited to 'module/admin.rb')
-rw-r--r-- | module/admin.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/module/admin.rb b/module/admin.rb index 72c2a14..f26a652 100644 --- a/module/admin.rb +++ b/module/admin.rb @@ -38,19 +38,19 @@ module Dinobot def join(m, args) return unless is_admin?(m.user) - m.response << [:join, args.strip] + m.respond [:join, args.strip] end def part(m, args) return unless is_admin?(m.user) - m.response << [:part, args.strip] + m.respond [:part, args.strip] end def quit(m, args) return unless is_admin?(m.user) - m.response << [:quit, args ? args.strip : 'Quitting.'] + m.respond [:quit, args ? args.strip : 'Quitting.'] end def load(m, args) @@ -72,20 +72,20 @@ module Dinobot def listadmins(m, args) return unless is_admin?(m.user) - m.response << [:say, m.channel, "Admins: #{@admins.join(' ')}"] + m.respond [:say, m.channel, "Admins: #{@admins.join(' ')}"] end def listmodules(m, args) return unless is_admin?(m.user) - m.response << [:say, m.channel, + m.respond [:say, m.channel, "Modules: #{@bot.modules.keys.sort.join(' ')}"] end def listchannels(m, args) return unless is_admin?(m.user) - m.response << [:say, m.channel, + m.respond [:say, m.channel, "Channels: #{@bot.channels.sort.join(' ')}"] end end |