]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
attempt to resolve #65
authorTom Gilbert <tom@linuxbrit.co.uk>
Thu, 9 Feb 2006 20:44:50 +0000 (20:44 +0000)
committerTom Gilbert <tom@linuxbrit.co.uk>
Thu, 9 Feb 2006 20:44:50 +0000 (20:44 +0000)
lib/rbot/plugins.rb
lib/rbot/registry.rb

index f45e44f48d97bda5669ac2d718547785c20493ba..54b814e0eb400c89e5c58c09c0f017a3141ce93d 100644 (file)
@@ -99,6 +99,10 @@ module Plugins
       @registry = BotRegistryAccessor.new(@bot, self.class.to_s.gsub(/^.*::/, ""))
     end
 
+    def flush_registry
+      @registry.flush
+    end
+
     def map(*args)
       @handler.map(*args)
       # register this map
@@ -212,6 +216,7 @@ module Plugins
 
     # call the save method for each active plugin
     def save
+      delegate 'flush_registry'
       delegate 'save'
     end
 
index 6afc7622e745dfd54db608fef627b235ac96337a..6388c91db4d7b7bcbc250ae92520c7ac901f0e63 100644 (file)
@@ -118,6 +118,10 @@ module Irc
       # debug "initializing registry accessor with name #{@name}"
     end
 
+    def flush
+      @registry.flush
+    end
+
     # convert value to string form for storing in the registry
     # defaults to Marshal.dump(val) but you can override this in your module's
     # registry object to use any method you like.