mirror of
https://github.com/nishiki/botish.git
synced 2024-11-23 00:07:51 +00:00
add options plugins_dir
This commit is contained in:
parent
ac32247f4c
commit
f0734fa895
5 changed files with 5 additions and 4 deletions
|
@ -36,10 +36,6 @@ OptionParser.new do |opts|
|
|||
end
|
||||
end.parse!
|
||||
|
||||
Dir["#{File.expand_path('../../modules', __FILE__)}/*"].each do |f|
|
||||
require_relative f
|
||||
end
|
||||
|
||||
botish = Botish::Botish.new(options[:config_file])
|
||||
botish.connect
|
||||
botish.listen
|
||||
|
|
|
@ -5,3 +5,4 @@ user: botish
|
|||
channels:
|
||||
- test
|
||||
- test2
|
||||
plugins_dir: /path/plugins
|
||||
|
|
|
@ -28,6 +28,10 @@ module Botish
|
|||
@channels = config['channels']
|
||||
@user = config['user'] || 'botish'
|
||||
@port = config['port'] || 6667
|
||||
|
||||
Dir["#{config['plugins_dir']}/*"].each do |f|
|
||||
require_relative f
|
||||
end
|
||||
end
|
||||
|
||||
def connect
|
||||
|
|
Loading…
Reference in a new issue