From: Andy Spencer Date: Sun, 22 Nov 2015 21:51:36 +0000 (+0000) Subject: Add .whoami command X-Git-Url: http://pileus.org/git/?p=~andy%2Frhawk;a=commitdiff_plain;h=f00be486b00fba4c339b6a8a40ab0fdf1025eccd Add .whoami command --- diff --git a/spades.awk b/spades.awk index d605075..1818bbd 100644 --- a/spades.awk +++ b/spades.awk @@ -663,6 +663,15 @@ match($0, /^\.newgame ?([1-9][0-9]*) *- *([1-9][0-9]*)$/, _arr) { } } +/^\.whoami/ { + if (!(sp_from in sp_players)) + reply("You are not playing") + else if (sp_from == FROM) + say(FROM " has an existential crisis") + else + reply("You are playing for " sp_from); +} + /^\.notify$/ { if (sp_from in sp_notify) reply("Your address is " sp_notify[sp_from])