1
0
Fork 0
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:
Adrien Waksberg 2017-04-19 22:38:17 +02:00
parent ac32247f4c
commit f0734fa895
5 changed files with 5 additions and 4 deletions

View file

@ -36,10 +36,6 @@ OptionParser.new do |opts|
end end
end.parse! end.parse!
Dir["#{File.expand_path('../../modules', __FILE__)}/*"].each do |f|
require_relative f
end
botish = Botish::Botish.new(options[:config_file]) botish = Botish::Botish.new(options[:config_file])
botish.connect botish.connect
botish.listen botish.listen

View file

@ -5,3 +5,4 @@ user: botish
channels: channels:
- test - test
- test2 - test2
plugins_dir: /path/plugins

View file

@ -28,6 +28,10 @@ module Botish
@channels = config['channels'] @channels = config['channels']
@user = config['user'] || 'botish' @user = config['user'] || 'botish'
@port = config['port'] || 6667 @port = config['port'] || 6667
Dir["#{config['plugins_dir']}/*"].each do |f|
require_relative f
end
end end
def connect def connect