]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/games/uno.rb
seen: show what user said or did before leaving
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / games / uno.rb
index 5b2593ee746212db524e62ca5b5a33cbf4171cb2..a86c33dba8d03216fa37cc9814baa885a470a318 100644 (file)
@@ -108,7 +108,7 @@ class UnoGame
       @color = 'Wild'
       raise if value and not value == '+4'
       if value
-        @value = value.dup 
+        @value = value.dup
         @shortform = 'w'+value
       else
         @value = nil
@@ -411,7 +411,7 @@ class UnoGame
         # only be possible if the first W+4 was illegal, so it wouldn't
         # apply for a W+4 played on a +2 anyway.
         #
-        if @picker == 0 and Wild === cards.first and cards.first.value 
+        if @picker == 0 and Wild === cards.first and cards.first.value
           # save the previous discard in case of challenge
           @last_discard = @discard.dup
           # save the color too, in case it was a Wild
@@ -880,6 +880,7 @@ class UnoPlugin < Plugin
     return unless @games.key?(m.channel)
     return unless m.plugin # skip messages such as: <someuser> botname,
     g = @games[m.channel]
+    replied = true
     case m.plugin.intern
     when :jo # join game
       return if m.params
@@ -945,7 +946,10 @@ class UnoPlugin < Plugin
       else
         g.show_turn(:cards => false)
       end
+    else
+      replied=false
     end
+    m.replied=true if replied
   end
 
   def create_game(m, p)