From 46f1fd3ae3aaecbbc36b987e356393500431d498 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 12 Apr 2007 13:56:47 +0000 Subject: roulette plugin: clear() players' array instead of instantiating a new one --- data/rbot/plugins/games/roulette.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/rbot/plugins/games/roulette.rb b/data/rbot/plugins/games/roulette.rb index 0d2dc4c2..3b954077 100644 --- a/data/rbot/plugins/games/roulette.rb +++ b/data/rbot/plugins/games/roulette.rb @@ -71,7 +71,7 @@ class RoulettePlugin < Plugin totals.wins += 1 @registry["player " + plyr] = pdata } - @players = Array.new + @players.clear @bot.kick(m.replyto, m.sourcenick, "*BANG*") if @bot.config['roulette.kick'] else m.reply "#{m.sourcenick}: chamber #{6 - @chambers.length} of 6 => +click+" @@ -117,7 +117,7 @@ class RoulettePlugin < Plugin totals.games += 1 @registry["totals"] = totals - @players = Array.new + @players.clear end def spin(m, params={}) -- cgit v1.2.3