]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
twitter plugin: twitter actions off was not working
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 25 Feb 2008 09:18:00 +0000 (10:18 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 25 Feb 2008 09:18:00 +0000 (10:18 +0100)
Since the twitter plugin is set to store strings, 'false' was stored (and
restored) as a string instead of a boolean value. Fix by deleting the key
instead of setting it to false.

data/rbot/plugins/twitter.rb

index 0aabe660fac4ae5d79434728461e7feeca205195..a5ca23f87a16ae1d6e1b8ba0fdc1b93d0c578ec7 100644 (file)
@@ -165,7 +165,7 @@ class TwitterPlugin < Plugin
       @registry[m.sourcenick + "_actions"] = true
       m.okay
     when 'off'
-      @registry[m.sourcenick + "_actions"] = false
+      @registry.delete(m.sourcenick + "_actions")
       m.okay
     else
       if @registry[m.sourcenick + "_actions"]