From e4a9e7905f4f8135459c3a4accf57156697f03c4 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 5 Aug 2010 09:40:50 +0200 Subject: UNO!: don't replace with nonexisting players --- data/rbot/plugins/games/uno.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index 4eab72c2..f493b5f8 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -752,6 +752,12 @@ class UnoGame def replace_player(old, new) # The new user user = channel.get_user(new) + if not user + announce _("there is no '%{nick}' here") % { + :nick => new + } + return + end if p = get_player(user) announce _("%{p} is already playing %{uno} here") % { :p => p, :uno => UNO -- cgit v1.2.3