diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-12 13:56:47 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-12 13:56:47 +0000 |
commit | 46f1fd3ae3aaecbbc36b987e356393500431d498 (patch) | |
tree | 9a9fe3ae4d228f371347b1d8da0e223903f27865 | |
parent | 5f58c780eea198c68e8b9528c9c07cca0f401257 (diff) |
roulette plugin: clear() players' array instead of instantiating a new one
-rw-r--r-- | data/rbot/plugins/games/roulette.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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={}) |