summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/journal.rb11
-rw-r--r--lib/rbot/ircbot.rb7
-rw-r--r--lib/rbot/journal.rb1
3 files changed, 12 insertions, 7 deletions
diff --git a/lib/rbot/core/journal.rb b/lib/rbot/core/journal.rb
index 4bd4ec3c..c4f5f0f4 100644
--- a/lib/rbot/core/journal.rb
+++ b/lib/rbot/core/journal.rb
@@ -7,6 +7,17 @@
require 'rbot/journal'
+module ::Irc
+class Bot
+ # this should return the journal if the managing plugin has been loaded.
+ def journal
+ if @plugins['journal']
+ @plugins['journal'].broker
+ end
+ end
+end
+end
+
class JournalModule < CoreBotModule
attr_reader :broker
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 46e4faaa..739aaade 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -226,13 +226,6 @@ 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
diff --git a/lib/rbot/journal.rb b/lib/rbot/journal.rb
index 9f586f7f..fe6c14be 100644
--- a/lib/rbot/journal.rb
+++ b/lib/rbot/journal.rb
@@ -278,6 +278,7 @@ module Journal
class JournalBroker
+ attr_reader :storage
class Subscription
attr_reader :topic
attr_reader :block