summaryrefslogtreecommitdiff
path: root/data/rbot/plugins
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-10 00:09:50 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-10 00:09:50 +0200
commit1b44d1d0b0a2f3b337a8f7c52d46df8dbb31cdc8 (patch)
treef2dd9592aab7994cbb501b9f59cfd99c1bed6c00 /data/rbot/plugins
parentd833247f099504e36c47286ad5abe4079a026ba1 (diff)
uno plugin: public announce of people on join
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r--data/rbot/plugins/games/uno.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb
index fdedc144..2d9321b8 100644
--- a/data/rbot/plugins/games/uno.rb
+++ b/data/rbot/plugins/games/uno.rb
@@ -485,9 +485,17 @@ class UnoGame
end
def add_player(user)
- return if get_player(user)
+ if p = get_player(user)
+ announce _("you're already in the game, %{p}") % {
+ :p => p
+ }
+ return
+ end
p = Player.new(user)
@players << p
+ announce _("%{p} joins this game of %{uno}") % {
+ :p => p, :uno => UNO
+ }
deal(p, 7)
if @join_timer
@bot.timer.reschedule(@join_timer, 10)