]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
wheelfortune: fix 'wof cancel' command
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 16 Dec 2007 21:07:03 +0000 (21:07 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 16 Dec 2007 21:07:03 +0000 (21:07 +0000)
data/rbot/plugins/games/wheelfortune.rb

index febf70e34bf38997a78628e518d4f26137ff375d..0aebf55d92b254ee3451d61bca59b485963e4a60 100644 (file)
@@ -545,7 +545,7 @@ class WheelOfFortune < Plugin
       return
     end
     # is the botuser the manager or allowed to cancel someone else's game?
-    if m.botuser == game.manager or m.botuser.permit?('wheelfortune::manage::other::cancel')
+    if m.botuser == @games[ch].manager or m.botuser.permit?('wheelfortune::manage::other::cancel')
       do_cancel(ch)
     else
       m.reply _("you can't cancel the current game")