Index: modules/variables.tcl
===================================================================
--- modules/variables.tcl	(revision 748)
+++ modules/variables.tcl	(working copy)
@@ -67,7 +67,7 @@
   set bMotionCache(randomUser) ""
   set bMotionCache(lastPlugin) ""
 
-  set bMotionCache(last_simple) ""
+  bMotion_plugins_settings_set "system" "last_simple" "" "" ""
 
 #this is set later
 set botnicks ""
Index: modules/plugins.tcl
===================================================================
--- modules/plugins.tcl	(revision 748)
+++ modules/plugins.tcl	(working copy)
@@ -80,7 +80,7 @@
 ## Find a simple plugin
 proc bMotion_plugin_find_simple { text lang } {
   bMotion_putloglev 3 * "bMotion_plugin_find_simple: text = $text, lang = $lang"
-  global bMotion_plugins_simple botnicks bMotionCache
+  global bMotion_plugins_simple botnicks
   set s [lsort [array names bMotion_plugins_simple]]
 
   foreach key $s {
@@ -96,11 +96,11 @@
       if [regexp -nocase $rexp $text] {
         set c [rand 100]
         bMotion_putloglev 4 * "simple plugin $key matches"
-        if {$bMotionCache(last_simple) == $key} {
+        if {[bMotion_plugins_settings_get "system" "last_simple" "" ""] == $key} {
           bMotion_putloglev 3 * "trying to trigger same simple plugin twice in a row, aborting"
           return ""
         }
-	      set bMotionCache(last_simple) $key
+	    bMotion_plugins_settings_set "system" "last_simple" "" "" $key
         if {$chance > $c} {
           bMotion_putloglev 4 * "  `- firing"
           return $response

