Merge pull request #221 from thelounge/astorije/quickfix-query

Disallow /query on non-nicks
This commit is contained in:
Pavel Djundik 2016-03-27 01:27:47 +02:00
commit 1ab136d897

View File

@ -14,6 +14,11 @@ exports.input = function(network, chan, cmd, args) {
return;
}
// If target doesn't start with an allowed character, ignore
if (!/^[a-zA-Z_\\\[\]{}^`|]/.test(target)) {
return;
}
var newChan = new Chan({
type: Chan.Type.QUERY,
name: target