From 3f8c82367c190fd86eae9f5192fa44a279472fd7 Mon Sep 17 00:00:00 2001 From: Gunter Labes Date: Sun, 24 May 2009 09:55:41 +0000 Subject: [PATCH] made it so add-ons with an unknown type get rejected --- src/campaign_server/campaign_server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/campaign_server/campaign_server.cpp b/src/campaign_server/campaign_server.cpp index 31f22f2a23b..a253a8cb7f1 100644 --- a/src/campaign_server/campaign_server.cpp +++ b/src/campaign_server/campaign_server.cpp @@ -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);