diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-08-05 09:40:50 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-08-05 09:41:30 +0200 |
commit | e4a9e7905f4f8135459c3a4accf57156697f03c4 (patch) | |
tree | c71504f632bee6553068e4853a052d112f0c20b3 /data/rbot/plugins/games/uno.rb | |
parent | c69013ca0fafc1e248a11baa95cef8e2ec1936d8 (diff) |
UNO!: don't replace with nonexisting players
Diffstat (limited to 'data/rbot/plugins/games/uno.rb')
-rw-r--r-- | data/rbot/plugins/games/uno.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |