]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/ircbot.rb
journal: start with core botmodule, api changes
[user/henk/code/ruby/rbot.git] / lib / rbot / ircbot.rb
index caabc15dc325f769ca7932cc4ba69b4de99980b5..46e4faaac7a6e0a90daa6dd43152c1eee5c7beb6 100644 (file)
@@ -156,7 +156,6 @@ require 'rbot/registry'
 require 'rbot/plugins'
 require 'rbot/message'
 require 'rbot/language'
-require 'rbot/journal'
 
 module Irc
 
@@ -205,9 +204,6 @@ class Bot
   # web service
   attr_accessor :webservice
 
-  # persistent message queue
-  attr_accessor :journal
-
   # server we are connected to
   # TODO multiserver
   def server
@@ -230,6 +226,13 @@ class Bot
     myself.channels
   end
 
+  # returns the journal
+  def journal
+    if @plugins['journal']
+      @plugins['journal'].broker
+    end
+  end
+
   # nick wanted by the bot. This defaults to the irc.nick config value,
   # but may be overridden by a manual !nick command
   def wanted_nick
@@ -550,8 +553,6 @@ class Bot
 
     log_session_start
 
-    @journal = Journal::JournalBroker.new(bot: self)
-
     if $daemonize
       log "Redirecting standard input/output/error"
       [$stdin, $stdout, $stderr].each do |fd|