X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=spades.awk;h=c043eebb579d6d942c3bff6bd4855ac177d03e49;hb=7c0cb1f9fb1b5684991570e0fcb401a0502c7ee3;hp=c7cf9cbe87c4c250f815d53bdadfaf6419bf6077;hpb=d3fe818aa64fc696257802ece93505a82e297dc1;p=~andy%2Frhawk diff --git a/spades.awk b/spades.awk index c7cf9cb..c043eeb 100644 --- a/spades.awk +++ b/spades.awk @@ -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 &&