]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
plugin(wheelfortune): remove botdata dependency
authorMatthias Hecker <mail@apoc.cc>
Wed, 15 Apr 2020 17:55:32 +0000 (19:55 +0200)
committerMatthias Hecker <mail@apoc.cc>
Wed, 15 Apr 2020 17:55:32 +0000 (19:55 +0200)
data/rbot/plugins/games/wheelfortune.rb

index 7e81895378f288dc78703030e86cd6bed9a20031..20213e5d6c674a0808934e7eaf3a6d084397eb50 100644 (file)
@@ -269,9 +269,9 @@ class WheelOfFortune < Plugin
     end
     name = p[:name].to_s
     if name.empty?
-      name = m.source.get_botdata("wheelfortune.game_name") || @bot.config['wheelfortune.game_name']
+      name = @registry["game_name_#{m.source.to_s}"] || @bot.config['wheelfortune.game_name']
     else
-      m.source.set_botdata("wheelfortune.game_name", name.dup)
+      @registry["game_name_#{m.source.to_s}"] = name
     end
     @games[ch] = game = WoFGame.new(name, m.botuser, p[:single], p[:max])
     @bot.say chan, _("%{who} just created a new %{name} game to %{max} points (%{single} per question, %{price} per vowel)") % {