From 1b44d1d0b0a2f3b337a8f7c52d46df8dbb31cdc8 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 10 Apr 2008 00:09:50 +0200 Subject: [PATCH] uno plugin: public announce of people on join --- data/rbot/plugins/games/uno.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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) -- 2.39.2