44 bool login(
const std::string& name,
const std::string&
password);
111 std::string
user_info(
const std::string& name);
147 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);
156 void db_update_game_end(
const std::string& uuid,
int game_id,
const std::string& replay_location);
171 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);
185 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& source,
const std::string& version);
223 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);
232 unsigned long long db_insert_login(
const std::string& username,
const std::string& ip,
const std::string& version);
258 void get_ips_for_user(
const std::string& username, std::ostringstream* out);
unsigned long long db_insert_login(const std::string &username, const std::string &ip, const std::string &version)
Inserts into the database for when a player logs in.
void user_logged_in(const std::string &name)
Sets the last login time to the current time.
std::time_t get_lastlogin(const std::string &user)
std::string user_info(const std::string &name)
bool user_exists(const std::string &name)
This class is responsible for handling the database connections as well as executing queries and hand...
player_connections::const_iterator player_iterator
void set_is_moderator(const std::string &name, const bool &is_moderator)
Sets or unsets whether the player should be considered a moderator in the extra table.
fuh(const config &c)
Reads wesnothd's config for the data needed to initialize this class and dbconn.
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)
Runs an asynchronous query to fetch the user's game history data.
long get_forum_id(const std::string &name)
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)
Inserts information about an uploaded add-on into the database.
dbconn conn_
An instance of the class responsible for executing the queries and handling the database connection...
A class to handle the non-SQL logic for connecting to the phpbb forum database.
ban_info user_is_banned(const std::string &name, const std::string &addr)
bool db_topic_id_exists(int topic_id)
Checks whether a forum thread with topic_id exists.
An interface class to handle nick registration To activate it put a [user_handler] section into the s...
std::string get_tournaments()
void db_set_oos_flag(const std::string &uuid, int game_id)
Sets the OOS flag in the database if wesnothd is told by a client it has detected an OOS error...
std::string db_extra_table_
The name of the extras custom table, not part of a phpbb database.
bool user_is_active(const std::string &name)
static map_location::DIRECTION s
int mp_mod_group_
The group ID of the forums MP Moderators group.
std::string password(const std::string &server, const std::string &login)
std::time_t get_registrationdate(const std::string &user)
std::string db_users_table_
The name of the phpbb users table.
bool is_user_in_group(const std::string &name, int group_id)
bool user_is_moderator(const std::string &name)
void db_update_logout(unsigned long long login_id)
Updates the database for when a player logs out.
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)
Inserts game related information.
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 &source, const std::string &version)
Inserts information about the content being played.
std::string get_hashed_password_from_db(const std::string &user)
void get_users_for_ip(const std::string &ip, std::ostringstream *out)
Searches for all players that logged in using the ip address.
A config object defines a single node in a WML file, with access to child nodes.
std::string extract_salt(const std::string &name)
Needed because the hashing algorithm used by phpbb requires some info from the original hash to recre...
std::string get_user_email(const std::string &user)
void db_update_game_end(const std::string &uuid, int game_id, const std::string &replay_location)
Update the game related information when the game ends.
bool login(const std::string &name, const std::string &password)
Retrieves the player's hashed password from the phpbb forum database and checks if it matches the has...
void async_test_query(boost::asio::io_service &io_service, int limit)
A simple test query for running a query asynchronously.
void get_ips_for_user(const std::string &username, std::ostringstream *out)
Searches for all ip addresses used by the player.
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)
Inserts player information per side.