Remove unnecessary if in /ban
If whois info is unavailable, the promise is rejected.
This commit is contained in:
@@ -27,9 +27,6 @@ const ban = {
|
||||
}
|
||||
const client = getActiveClient(app);
|
||||
client.whois(nick).then((whois) => {
|
||||
if (whois === null) {
|
||||
throw new Error("No such nick");
|
||||
};
|
||||
const info = whois[irc.RPL_WHOISUSER].params;
|
||||
const user = info[2];
|
||||
const host = info[3];
|
||||
|
||||
Reference in New Issue
Block a user