Classes | |
class | blacklist |
Add-on blacklist table. More... | |
class | control_line |
Represents a server control line written to a communication socket. More... | |
class | server |
Legacy add-ons server. More... | |
Functions | |
std::string | format_addon_feedback_url (const std::string &format, const config ¶ms) |
Format a feedback URL for an add-on. More... | |
void | find_translations (const config &base_dir, config &addon) |
Scans an add-on archive directory for translations. More... | |
void | add_license (config &cfg) |
Adds a COPYING.txt file with the full text of the GNU GPL to an add-on. More... | |
bool | is_text_markup_char (char c) |
Variables | |
const std::string | illegal_markup_chars = "*`~{^}|@#<&" |
Markup characters recognized by GUI1 code. More... | |
Adds a COPYING.txt file with the full text of the GNU GPL to an add-on.
This only has an effect if the add-on archive cfg does not already contain an equivalent file ('copying.txt', 'COPYING', etc.).
Definition at line 105 of file addon_utils.cpp.
References config::add_child(), config::find_child(), LOG_CS, game_config::path, and filesystem::read_file().
Referenced by campaignd::server::handle_upload().
Scans an add-on archive directory for translations.
Any subdirectories of base_dir containing a subdirectory named 'LC_MESSAGES' are assumed to be translation dirs. The names of the subdirectories thus located are recorded into the addon WML node in [translation] children nodes like the following (comments included for documentation purposes):
* [translation] * language="es" # translations/es/LC_MESSAGES/ * [/translation] * [translation] * language="ja" # translations/ja/LC_MESSAGES/ * [/translation] *
Definition at line 93 of file addon_utils.cpp.
References config::add_child(), and config::child_range().
Referenced by campaignd::server::handle_upload().
std::string campaignd::format_addon_feedback_url | ( | const std::string & | format, |
const config & | params | ||
) |
Format a feedback URL for an add-on.
format | The format string for the URL, presumably obtained from the add-ons server identification. |
params | The URL format parameters table. |
Definition at line 61 of file addon_utils.cpp.
References config::attribute_range(), config::empty(), and utils::urlencode().
Referenced by campaignd::server::handle_request_campaign_list().
|
inline |
Definition at line 32 of file addon_utils.hpp.
Referenced by campaignd::server::handle_upload().
const std::string campaignd::illegal_markup_chars = "*`~{^}|@#<&" |
Markup characters recognized by GUI1 code.
These must be the same as the constants defined in marked-up_text.cpp.
Definition at line 59 of file addon_utils.cpp.