Revert 2012-01-21T23:16:25Z!gabrielmorin@gmail.com

"Added --username and --password options for testing purposes."

Was commited accidentally.
This commit is contained in:
Gabriel Morin 2012-01-21 23:20:08 +00:00
parent 337cc47f69
commit 0de65b4f5e
3 changed files with 0 additions and 20 deletions

View file

@ -100,8 +100,6 @@ commandline_options::commandline_options ( int argc, char** argv ) :
resolution(),
rng_seed(),
server(),
username(),
password(),
screenshot(false),
screenshot_map_file(),
screenshot_output_file(),
@ -147,8 +145,6 @@ commandline_options::commandline_options ( int argc, char** argv ) :
("rng-seed", po::value<unsigned int>(), "seeds the random number generator with number <arg>. Example: --rng-seed 0")
("screenshot", po::value<two_strings>()->multitoken(), "takes two arguments: <map> <output>. Saves a screenshot of <map> to <output> without initializing a screen. Editor must be compiled in for this to work.")
("server,s", po::value<std::string>()->implicit_value(std::string()), "connects to the host <arg> if specified or to the first host in your preferences.")
("username", po::value<std::string>(), "uses <username> when connecting to a server, ignoring other preferences.")
("password", po::value<std::string>(), "uses <password> when connecting to a server, ignoring other preferences.")
("strict-validation", "makes validation errors fatal")
("test,t", po::value<std::string>()->implicit_value(std::string()), "runs the game in a small test scenario. If specified, scenario <arg> will be used instead.")
("validcache", "assumes that the cache is valid. (dangerous)")
@ -355,10 +351,6 @@ commandline_options::commandline_options ( int argc, char** argv ) :
}
if (vm.count("server"))
server = vm["server"].as<std::string>();
if (vm.count("username"))
username = vm["username"].as<std::string>();
if (vm.count("password"))
password = vm["password"].as<std::string>();
if (vm.count("side"))
multiplayer_side = parse_to_uint_string_tuples_(vm["side"].as<std::vector<std::string> >());
if (vm.count("test"))

View file

@ -146,10 +146,6 @@ public:
boost::optional<unsigned int> rng_seed;
/// Non-empty if --server was given on the command line. Connects Wesnoth to specified server. If no server was specified afterwards, contains an empty string.
boost::optional<std::string> server;
/// Non-empty if --username was given on the command line. Forces Wesnoth to use this network username.
boost::optional<std::string> username;
/// Non-empty if --password was given on the command line. Forces Wesnoth to use this network password.
boost::optional<std::string> password;
/// True if --screenshot was given on the command line. Starts Wesnoth in screenshot mode.
bool screenshot;
/// Map file to make a screenshot of. First parameter given after --screenshot.

View file

@ -236,14 +236,6 @@ game_controller::game_controller(const commandline_options& cmdline_opts, const
multiplayer_server_ = "";
}
}
if (cmdline_opts_.username) {
preferences::disable_preferences_save();
preferences::set_login(*cmdline_opts_.username);
}
if (cmdline_opts_.password) {
preferences::disable_preferences_save();
preferences::set_password(*cmdline_opts_.password);
}
if (cmdline_opts_.smallgui)
game_config::small_gui = true;
if (cmdline_opts_.test)