summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-12-07 19:10:02 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-12-07 19:10:02 +0000
commitb77ef7652c9856a4b52fa2534519e1dd61de75b9 (patch)
tree51b897efeb6209af579c3140200f35420ad132d2 /data/rbot
parentecc5a1df73814bf6bc5f7450d3f5cd7ead0c1386 (diff)
wheelfortune: the name of the game chosen by the player is stored for future retrieval
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/games/wheelfortune.rb6
1 files changed, 5 insertions, 1 deletions
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,