mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
/itemsearch: Fix using the 'all' parameter (#4091)
Previously, the command allowed users to broadcast with ', all' I removed the ',all' option because the command doesn't support separating words with just a comma anyway.
This commit is contained in:
parent
9fd88de6c1
commit
86bbf874b0
|
|
@ -1247,7 +1247,8 @@ function runItemsearch(target, cmd, canAll, message) {
|
|||
let showAll = false;
|
||||
|
||||
target = target.trim();
|
||||
if (target.substr(target.length - 5) === ', all' || target.substr(target.length - 4) === ',all') {
|
||||
if (target.substr(target.length - 5) === ', all') {
|
||||
if (!canAll) return {reply: "A search ending in ', all' cannot be broadcast."};
|
||||
showAll = true;
|
||||
target = target.substr(0, target.length - 5);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user