Skip to content

Commit

Permalink
Merge pull request #4553 from thelounge/bookworm/who-in-buffer
Browse files Browse the repository at this point in the history
Validate user input in /whois
  • Loading branch information
MaxLeiter committed Apr 30, 2022
2 parents fafa844 + 1d8e0c1 commit 9e89a17
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/plugins/inputs/whois.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ exports.input = function ({irc}, chan, cmd, args) {
}
};

if (!target) {
sendToClient({
error: `/${cmd} needs a target nick`,
});
return;
}

switch (cmd) {
case "whois":
irc.whois(target, targetNick, sendToClient);
Expand Down

0 comments on commit 9e89a17

Please sign in to comment.