- if File.exists? @praisefile
- IO.foreach(@praisefile) { |line|
- @praises << line.chomp
- }
- elsif File.exists? @oldpraise
- IO.foreach(@oldpraise) { |line|
- @praises << line.chomp
- }
+
+ # without migrations, the initial data files we load from is located in the plugin directory
+ # that is the directory in which the plugin file itself is located (.../data/rbot/plugins/ usually)
+ if not @larts or not @praises
+ log "load initial larts and praises from #{plugin_path}"
+
+ initial_path = File.join(plugin_path, 'lart')
+ @larts = load_static_files(initial_path, 'larts')
+ @praises = load_static_files(initial_path, 'praises')