Added '/whoami' command
This commit is contained in:
parent
5e3abe2347
commit
03d8510486
|
@ -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
|
||||||
|
|
|
@ -30,6 +30,7 @@ $(function() {
|
||||||
"/slap",
|
"/slap",
|
||||||
"/topic",
|
"/topic",
|
||||||
"/voice",
|
"/voice",
|
||||||
|
"/whoami",
|
||||||
"/whois",
|
"/whois",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue