4 # :title: rbot journal management from IRC
6 # Author:: Matthias Hecker (apoc@geekosphere.org)
12 # this should return the journal if the managing plugin has been loaded.
14 if @plugins['journal']
15 @plugins['journal'].broker
21 class JournalModule < CoreBotModule
25 include Irc::Bot::Journal
27 Config.register Config::StringValue.new('journal.storage',
29 :requires_rescan => true,
30 :desc => 'storage engine used by the journal')
31 Config.register Config::StringValue.new('journal.storage.uri',
33 :requires_rescan => true,
34 :desc => 'storage database uri')
39 name = @bot.config['journal.storage']
40 uri = @bot.config['journal.storage.uri']
43 storage = Storage.create(name, uri)
45 error 'journal storage initialization error!'
50 debug 'journal broker starting up...'
51 @broker = JournalBroker.new(storage: storage)
56 debug 'journal broker shutting down...'
61 def help(plugin, topic='')
67 journal = JournalModule.new