Merge pull request #1052 from KinglyKrab/master

Fix #findzone to allow you to search using part of a zone's short name.
This commit is contained in:
Chris Miles 2020-05-09 17:15:50 -05:00 committed by GitHub
commit 90e6bb8a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4125,7 +4125,8 @@ void command_findzone(Client *c, const Seperator *sep)
*/
if (id == 0) {
query = fmt::format(
"SELECT zoneidnumber, short_name, long_name, version FROM zone WHERE long_name LIKE '%{}%'",
"SELECT zoneidnumber, short_name, long_name, version FROM zone WHERE long_name LIKE '%{}%' OR `short_name` LIKE '%{}%'",
EscapeString(sep->arg[1]),
EscapeString(sep->arg[1])
);
}