]> Pileus Git - ~andy/rhawk/blobdiff - spades.awk
Rename spades test and ignore local copy
[~andy/rhawk] / spades.awk
index c7cf9cbe87c4c250f815d53bdadfaf6419bf6077..c043eebb579d6d942c3bff6bd4855ac177d03e49 100644 (file)
@@ -428,6 +428,14 @@ AUTH == OWNER &&
        next
 }
 
+AUTH == OWNER &&
+/^\.order (\w+) ([0-4])/ {
+       say(sp_channel, FROM " is cheating for " $2)
+       sp_order[$3] = $2
+       sp_players[$2] = $3
+       sp_player = sp_order[sp_turn]
+}
+
 AUTH == OWNER &&
 sp_state == "play" &&
 /^\.force (\w+) (\S+)$/ {
@@ -539,8 +547,11 @@ match($0, /^\.newgame ?([0-9]+) *- *([0-9]+)$/, _arr) {
 
 sp_state ~ "(bid|pass|play)" &&
 /^\.show/ {
+       delete _lines
        for (_i in sp_share)
-               say(_i " can play for " sp_share[_i]);
+               _lines[sp_share[_i]] = _lines[sp_share[_i]] " " _i
+       for (_i in _lines)
+               say(_i " allowed:" _lines[_i])
 }
 
 !sp_valid &&