Author: soliton
Date: Sun May 24 11:54:26 2009
New Revision: 35864

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35864&view=rev
Log:
made it so add-ons with an unknown type get rejected

Modified:
    branches/1.6/src/campaign_server/campaign_server.cpp

Modified: branches/1.6/src/campaign_server/campaign_server.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/campaign_server/campaign_server.cpp?rev=35864&r1=35863&r2=35864&view=diff
==============================================================================
--- branches/1.6/src/campaign_server/campaign_server.cpp (original)
+++ branches/1.6/src/campaign_server/campaign_server.cpp Sun May 24 11:54:26 
2009
@@ -503,9 +503,9 @@
                                                } 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);


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to