summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/games/uno.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-08-05 09:43:51 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-08-05 09:43:56 +0200
commitf8f4f5909a45334ceac1b259a380e255b8e75357 (patch)
tree9dc814ab021768925d13e49a9e8c17c852d7b8ff /data/rbot/plugins/games/uno.rb
parente4a9e7905f4f8135459c3a4accf57156697f03c4 (diff)
UNO!: replace_player() returns whether it worked or not
Diffstat (limited to 'data/rbot/plugins/games/uno.rb')
-rw-r--r--data/rbot/plugins/games/uno.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb
index f493b5f8..870526fc 100644
--- a/data/rbot/plugins/games/uno.rb
+++ b/data/rbot/plugins/games/uno.rb
@@ -756,13 +756,13 @@ class UnoGame
announce _("there is no '%{nick}' here") % {
:nick => new
}
- return
+ return false
end
if p = get_player(user)
announce _("%{p} is already playing %{uno} here") % {
:p => p, :uno => UNO
}
- return
+ return false
end
# We scan the player list of the player with the old nick, instead
# of using get_player, in case of IRC drops etc
@@ -772,12 +772,13 @@ class UnoGame
announce _("%{p} takes %{b}%{old}%{b}'s place at %{uno}") % {
:p => p, :b => Bold, :old => old, :uno => UNO
}
- return
+ return true
end
end
announce _("%{b}%{old}%{b} isn't playing %{uno} here") % {
:uno => UNO, :b => Bold, :old => old
}
+ return false
end
def end_game(halted = false)