mirror of
https://github.com/nishiki/botish.git
synced 2024-11-23 08:07:52 +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
|
||||||
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
|
||||||
|
|
|
@ -5,3 +5,4 @@ user: botish
|
||||||
channels:
|
channels:
|
||||||
- test
|
- test
|
||||||
- test2
|
- test2
|
||||||
|
plugins_dir: /path/plugins
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue