X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=spades.awk;h=9f404d8cea4665fa43d0e5490610504e34aa25a7;hb=934287791f5fe72ce414a2740c47de5647586707;hp=89c5a7ae1475fa9b4b10c63ebde467dd49621444;hpb=9434e58ec0bba125e4e0102817ea31c79a0de05b;p=~andy%2Frhawk diff --git a/spades.awk b/spades.awk index 89c5a7a..9f404d8 100644 --- a/spades.awk +++ b/spades.awk @@ -164,7 +164,7 @@ function sp_say(msg) { say(sp_channel, msg) print msg |& sp_sock - print strftime("%Y-%m-%d %H:%M:%S | ") msg >> "logs/" sp_log + print strftime("%Y-%m-%d %H:%M:%S | ") sp_ugly(msg) >> "logs/" sp_log fflush("logs/" sp_log) } @@ -183,6 +183,16 @@ function sp_pretty(cards, who) return cards } +function sp_ugly(cards, who) +{ + gsub(/[\2\17]|\3[14],00|/, "", cards) + gsub(/♠/, "s", cards) + gsub(/♥/, "h", cards) + gsub(/♦/, "d", cards) + gsub(/♣/, "c", cards) + return cards +} + function sp_next(who, prev) { prev = sp_turn @@ -529,7 +539,7 @@ AUTH == OWNER && } /^\.help game$/ { - say(".newgame [score] -- start a game to points, default 500") + say(".newgame [score] -- start a game to points, default 300") say(".endgame -- abort the current game") say(".savegame -- save the current game to disk") say(".loadgame -- load the previously saved game") @@ -600,7 +610,7 @@ match($0, /^\.newgame ?([1-9][0-9]*) *- *([1-9][0-9]*)$/, _arr) { } else { $1 = ".join" sp_owner = FROM - sp_playto = $2 ? $2 : 200 + sp_playto = $2 ? $2 : 300 sp_limit = sp_playto > 200 ? 10 : 5; sp_state = "join" sp_channel = DST