Use symbols for module configuration keys
This commit is contained in:
parent
f003d5505d
commit
09d8506f82
2 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ module Lain
|
||||||
Modules = {
|
Modules = {
|
||||||
'Credits' => {},
|
'Credits' => {},
|
||||||
'DDate' => {},
|
'DDate' => {},
|
||||||
'Fortune' => { 'command' => '/usr/bin/fortune -a' },
|
'Fortune' => { :command => '/usr/bin/fortune -a' },
|
||||||
'Help' => {},
|
'Help' => {},
|
||||||
'Topic' => {},
|
'Topic' => {},
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ module Lain
|
||||||
def on_message(muc, message)
|
def on_message(muc, message)
|
||||||
return unless /\A!fortune\b/ =~ message.body
|
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
|
end
|
||||||
|
|
||||||
def commands
|
def commands
|
||||||
|
|
Reference in a new issue