]> Pileus Git - ~andy/rhawk/blobdiff - spades.awk
Remove pretty formatting from email messages
[~andy/rhawk] / spades.awk
index 013f373b7ca3ef53faf92f032f3908015978d7e5..2ca0e376e7fbe7e975ca67d5a78defe5c1ccddff 100644 (file)
@@ -760,11 +760,12 @@ sp_state == "play" &&
 
        if (/!!/ && (sp_state == "bid" || sp_state == "play")) {
                if (sp_player in sp_notify) {
-                       mail_send(sp_notify[sp_player],                         \
-                               (sp_state == "bid"  ? "It is your bid!"  : "")  \
-                               (sp_state == "play" ? "It is your turn!" : ""), \
-                               (sp_state == "bid"  ? "Bids: " _bids     : "")  \
-                               (sp_state == "play" ? "Pile: " _pile     : ""))
+                       _bids = _bids ? _bids    : "none"
+                       _pile = _pile ? sp_piles : "none"
+                       mail_send(sp_notify[sp_player],     \
+                               "It is your " sp_state "!", \
+                               "Bids so far:  " _bids "\n" \
+                               "Cards played: " _pile)
                        say("Notified " sp_player " at " sp_notify[sp_player])
                } else {
                        say("No email address for " sp_player)