From b77ef7652c9856a4b52fa2534519e1dd61de75b9 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 7 Dec 2007 19:10:02 +0000 Subject: [PATCH] wheelfortune: the name of the game chosen by the player is stored for future retrieval --- data/rbot/plugins/games/wheelfortune.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/rbot/plugins/games/wheelfortune.rb b/data/rbot/plugins/games/wheelfortune.rb index d965409f..d0178c07 100644 --- a/data/rbot/plugins/games/wheelfortune.rb +++ b/data/rbot/plugins/games/wheelfortune.rb @@ -221,7 +221,11 @@ class WheelOfFortune < Plugin return end name = p[:name].to_s - name = @bot.config['wheelfortune.game_name'] if name.empty? + if name.empty? + name = m.source.get_botdata("wheelfortune.game_name") || @bot.config['wheelfortune.game_name'] + else + m.source.set_botdata("wheelfortune.game_name", name.dup) + 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)") % { :name => game.name, -- 2.39.5