]> Pileus Git - ~andy/rhawk/commitdiff
Add .whoami command
authorAndy Spencer <andy753421@gmail.com>
Sun, 22 Nov 2015 21:51:36 +0000 (21:51 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 22 Nov 2015 21:51:36 +0000 (21:51 +0000)
spades.awk

index d60507546a26de3e9a57e42a366dcc778ddf7045..1818bbd9b11d43640ab91cf78694ba4134a3bc2b 100644 (file)
@@ -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])
 /^\.notify$/ {
        if (sp_from in sp_notify)
                reply("Your address is " sp_notify[sp_from])