made it so add-ons with an unknown type get rejected

This commit is contained in:
Gunter Labes 2009-05-24 09:55:41 +00:00
parent 171914d875
commit 3f8c82367c

View file

@ -506,9 +506,9 @@ namespace {
} else if (upload["title"].empty()) {
LOG_CS << "Upload aborted - no add-on title specified.\n";
network::send_data(construct_error("Add-on rejected: You did not specify the title of the add-on in the pbl file!"), sock, gzipped);
} else if (upload["type"].empty()) {
LOG_CS << "Upload aborted - no add-on type specified.\n";
network::send_data(construct_error("Add-on rejected: You did not specify the type of the add-on in the pbl file!"), sock, gzipped);
} else if (get_addon_type(upload["type"]) == ADDON_UNKNOWN) {
LOG_CS << "Upload aborted - unknown add-on type specified.\n";
network::send_data(construct_error("Add-on rejected: You did not specify a known type for the add-on in the pbl file! (See PblWML: wiki.wesnoth.org/PblWML)"), sock, gzipped);
} else if (upload["author"].empty()) {
LOG_CS << "Upload aborted - no add-on author specified.\n";
network::send_data(construct_error("Add-on rejected: You did not specify the author(s) of the add-on in the pbl file!"), sock, gzipped);