diff --git a/README.md b/README.md index d01c46c7..59b45133 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ These are the commands currently implemented: - [x] /slap - [x] /topic - [x] /voice +- [x] /whoami - [x] /whois ## Install diff --git a/client/js/chat.js b/client/js/chat.js index 3a16dba9..0437e0bb 100644 --- a/client/js/chat.js +++ b/client/js/chat.js @@ -30,6 +30,7 @@ $(function() { "/slap", "/topic", "/voice", + "/whoami", "/whois", ]; diff --git a/lib/server.js b/lib/server.js index 922cee76..9764f3ce 100644 --- a/lib/server.js +++ b/lib/server.js @@ -280,10 +280,13 @@ function input(data) { } break; + case "whoami": + var user = client.me; case "query": case "whois": - if (client && args[1]) { - client.whois(args[1]); + var user = user || args[1]; + if (client && user) { + client.whois(user); } break;