Use symbols for module configuration keys

This commit is contained in:
Matthias Schiffer 2013-01-03 08:35:03 +01:00
parent f003d5505d
commit 09d8506f82
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ module Lain
Modules = {
'Credits' => {},
'DDate' => {},
'Fortune' => { 'command' => '/usr/bin/fortune -a' },
'Fortune' => { :command => '/usr/bin/fortune -a' },
'Help' => {},
'Topic' => {},
}

View file

@ -8,7 +8,7 @@ module Lain
def on_message(muc, message)
return unless /\A!fortune\b/ =~ message.body
muc.say("\nBEGIN FORTUNE COOKIE\n" + IO.popen(@config['command']).read.chomp + "\nEND FORTUNE COOKIE")
muc.say("\nBEGIN FORTUNE COOKIE\n" + IO.popen(@config[:command]).read.chomp + "\nEND FORTUNE COOKIE")
end
def commands