+
+ def reload(m, params = {})
+ if m.private?
+ m.reply "you gotta play roulette in channel dude"
+ return
+ end
+
+ m.act "reloads"
+ reset_chambers
+ # all players win on a reload
+ # (allows you to play 3-shot matches etc)
+ totals = nil
+ if @registry.has_key?("totals")
+ totals = @registry["totals"]
+ else
+ totals = RouletteHistory.new(0,0,0,0,0)
+ end
+
+ @players.each {|plyr|
+ pdata = @registry["player " + plyr]
+ next if pdata == nil
+ pdata.wins += 1
+ totals.wins += 1
+ @registry["player " + plyr] = pdata
+ }
+
+ totals.games += 1
+ @registry["totals"] = totals
+
+ @players = Array.new
+ end
+
+ def spin(m, params={})
+ # Spinning is just like resetting, except that nobody wins
+ if m.private?
+ m.reply "you gotta play roulette in channel dude"
+ return
+ end
+
+ m.act "spins the cylinder"
+ reset_chambers
+ end
+
+ def reset_chambers