24 #include <boost/asio/io_service.hpp>
63 virtual bool login(
const std::string& name,
const std::string& password) = 0;
73 virtual std::string
user_info(
const std::string& name) = 0;
130 virtual void db_insert_game_info(
const std::string& uuid,
int game_id,
const std::string& version,
const std::string& name,
int reload,
int observers,
int is_public,
int has_password) = 0;
131 virtual void db_update_game_end(
const std::string& uuid,
int game_id,
const std::string& replay_location) = 0;
132 virtual void db_insert_game_player_info(
const std::string& uuid,
int game_id,
const std::string& username,
int side_number,
int is_host,
const std::string& faction,
const std::string& version,
const std::string& source,
const std::string& current_user,
const std::string& leaders) = 0;
133 virtual unsigned long long db_insert_game_content_info(
const std::string& uuid,
int game_id,
const std::string&
type,
const std::string& name,
const std::string&
id,
const std::string& addon_id,
const std::string& addon_version) = 0;
137 virtual void db_insert_addon_info(
const std::string& instance_version,
const std::string&
id,
const std::string& name,
const std::string&
type,
const std::string& version,
bool forum_auth,
int topic_id,
const std::string uploader) = 0;
138 virtual unsigned long long db_insert_login(
const std::string& username,
const std::string& ip,
const std::string& version) = 0;
146 virtual void db_insert_addon_authors(
const std::string& instance_version,
const std::string&
id,
const std::string& primary_author,
const std::vector<std::string>& secondary_authors) = 0;
A config object defines a single node in a WML file, with access to child nodes.
An interface class to handle nick registration To activate it put a [user_handler] section into the s...
virtual void db_delete_addon_authors(const std::string &instance_version, const std::string &id)=0
virtual std::string get_user_email(const std::string &user)=0
Returns the user's email from the forum database.
virtual long get_forum_id(const std::string &name)=0
Returns the forum user id for the given username.
virtual void db_insert_addon_authors(const std::string &instance_version, const std::string &id, const std::string &primary_author, const std::vector< std::string > &secondary_authors)=0
virtual void db_update_addon_download_count(const std::string &instance_version, const std::string &id, const std::string &version)=0
virtual ban_info user_is_banned(const std::string &name, const std::string &addr="")=0
Returns true if this user account or IP address is banned.
virtual void db_update_logout(unsigned long long login_id)=0
virtual bool login(const std::string &name, const std::string &password)=0
Return true if the given password matches the password for the given user.
virtual bool user_is_moderator(const std::string &name)=0
Returns true if this user is a moderator on this server.
@ BAN_EMAIL
Account email address ban.
@ BAN_USER
User account/name ban.
virtual unsigned long long db_insert_login(const std::string &username, const std::string &ip, const std::string &version)=0
virtual bool user_is_active(const std::string &name)=0
Returns true if the specified user account is usable for logins.
virtual void db_insert_addon_info(const std::string &instance_version, const std::string &id, const std::string &name, const std::string &type, const std::string &version, bool forum_auth, int topic_id, const std::string uploader)=0
virtual void db_insert_game_player_info(const std::string &uuid, int game_id, const std::string &username, int side_number, int is_host, const std::string &faction, const std::string &version, const std::string &source, const std::string ¤t_user, const std::string &leaders)=0
virtual void db_update_game_end(const std::string &uuid, int game_id, const std::string &replay_location)=0
virtual void db_set_oos_flag(const std::string &uuid, int game_id)=0
virtual bool db_is_user_primary_author(const std::string &instance_version, const std::string &id, const std::string &username)=0
virtual bool user_exists(const std::string &name)=0
Returns true if a user with the given name exists.
virtual std::string get_tournaments()=0
virtual unsigned long long db_insert_game_content_info(const std::string &uuid, int game_id, const std::string &type, const std::string &name, const std::string &id, const std::string &addon_id, const std::string &addon_version)=0
virtual bool db_is_user_secondary_author(const std::string &instance_version, const std::string &id, const std::string &username)=0
virtual void get_users_for_ip(const std::string &ip, std::ostringstream *out)=0
virtual bool db_topic_id_exists(int topic_id)=0
virtual std::string extract_salt(const std::string &username)=0
Create custom salt.
virtual void set_is_moderator(const std::string &name, const bool &is_moderator)=0
Mark this user as a moderator.
virtual std::string get_uuid()=0
virtual bool db_do_any_authors_exist(const std::string &instance_version, const std::string &id)=0
virtual void user_logged_in(const std::string &name)=0
Executed when the user with the given name logged in.
virtual void async_test_query(boost::asio::io_service &io_service, int limit)=0
virtual void async_get_and_send_game_history(boost::asio::io_service &io_service, wesnothd::server &s, wesnothd::player_iterator player, int player_id, int offset, std::string &search_game_name, int search_content_type, std::string &search_content)=0
virtual void db_insert_game_info(const std::string &uuid, int game_id, const std::string &version, const std::string &name, int reload, int observers, int is_public, int has_password)=0
virtual std::string user_info(const std::string &name)=0
Returns a string containing info like the last login of this user.
virtual void get_ips_for_user(const std::string &username, std::ostringstream *out)=0
player_connections::const_iterator player_iterator
Base class for all the errors encountered by the engine.
std::chrono::seconds duration
Ban duration (0 if permanent)
error(const std::string &message)
static map_location::direction s