]> Pileus Git - ~andy/rhawk/commitdiff
Make .play more lenient
authorAndy Spencer <andy753421@gmail.com>
Wed, 24 Jul 2013 04:49:58 +0000 (04:49 +0000)
committerAndy Spencer <andy753421@gmail.com>
Wed, 24 Jul 2013 04:51:19 +0000 (04:51 +0000)
spades.awk

index 58695c378874326e7ae2d854476d48c4237f3bd0..4d1d772218728d6ee16d84cfcc7194be1422fbbb 100644 (file)
@@ -395,7 +395,7 @@ AUTH == OWNER &&
 
 AUTH == OWNER &&
 sp_state == "play" &&
-/^\.play (\w+) (\S+)$/ {
+/^\.force (\w+) (\S+)$/ {
        say(sp_channel, FROM " is cheating for " $2)
        sp_from = $2
        sp_play($3)
@@ -549,8 +549,9 @@ sp_state ~ "(bid|pass|play)" &&
 
 sp_valid &&
 sp_state == "play" &&
-/^\.play (\S+)$/ {
+/^\.play (\S+)/ {
        _card = $2
+       gsub(/[^A-Za-z0-9]/, "", _card);
        if (!(_card in sp_deck)) {
                reply("Invalid card")
        }