From: Giuseppe Bilotta Date: Fri, 7 Dec 2007 19:10:02 +0000 (+0000) Subject: wheelfortune: the name of the game chosen by the player is stored for future retrieval X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=b77ef7652c9856a4b52fa2534519e1dd61de75b9;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git wheelfortune: the name of the game chosen by the player is stored for future retrieval --- 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,