Added '/whoami' command

This commit is contained in:
Mattias Erming 2014-06-12 14:11:12 +02:00
parent 5e3abe2347
commit 03d8510486
3 changed files with 7 additions and 2 deletions

View file

@ -37,6 +37,7 @@ These are the commands currently implemented:
- [x] /slap - [x] /slap
- [x] /topic - [x] /topic
- [x] /voice - [x] /voice
- [x] /whoami
- [x] /whois - [x] /whois
## Install ## Install

View file

@ -30,6 +30,7 @@ $(function() {
"/slap", "/slap",
"/topic", "/topic",
"/voice", "/voice",
"/whoami",
"/whois", "/whois",
]; ];

View file

@ -280,10 +280,13 @@ function input(data) {
} }
break; break;
case "whoami":
var user = client.me;
case "query": case "query":
case "whois": case "whois":
if (client && args[1]) { var user = user || args[1];
client.whois(args[1]); if (client && user) {
client.whois(user);
} }
break; break;