Add server uid to player reports table
This commit is contained in:
parent
44618c2a52
commit
ef9b80e5af
@ -275,6 +275,7 @@ CREATE TABLE online_id_ban
|
|||||||
|
|
||||||
CREATE TABLE player_reports
|
CREATE TABLE player_reports
|
||||||
(
|
(
|
||||||
|
server_uid TEXT NOT NULL, -- Report from which server unique id (config filename)
|
||||||
reporter_ip INTEGER UNSIGNED NOT NULL, -- IP decimal of player who reports
|
reporter_ip INTEGER UNSIGNED NOT NULL, -- IP decimal of player who reports
|
||||||
reporter_online_id INTEGER UNSIGNED NOT NULL, -- Online id of player who reports, 0 for offline player
|
reporter_online_id INTEGER UNSIGNED NOT NULL, -- Online id of player who reports, 0 for offline player
|
||||||
reporter_username TEXT NOT NULL, -- Player name who reports
|
reporter_username TEXT NOT NULL, -- Player name who reports
|
||||||
|
@ -803,10 +803,11 @@ void ServerLobby::writePlayerReport(Event* event)
|
|||||||
|
|
||||||
std::string query = StringUtils::insertValues(
|
std::string query = StringUtils::insertValues(
|
||||||
"INSERT INTO %s "
|
"INSERT INTO %s "
|
||||||
"(reporter_ip, reporter_online_id, reporter_username, info, "
|
"(server_uid, reporter_ip, reporter_online_id, reporter_username, "
|
||||||
"reporting_ip, reporting_online_id, reporting_username) "
|
"info, reporting_ip, reporting_online_id, reporting_username) "
|
||||||
"VALUES (%u, %u, \"%s\", \"%s\", %u, %u, \"%s\");",
|
"VALUES (\"%s\", %u, %u, \"%s\", \"%s\", %u, %u, \"%s\");",
|
||||||
ServerConfig::m_player_reports_table.c_str(),
|
ServerConfig::m_player_reports_table.c_str(),
|
||||||
|
ServerConfig::m_server_uid.c_str(),
|
||||||
reporter->getAddress().getIP(), reporter_npp->getOnlineId(),
|
reporter->getAddress().getIP(), reporter_npp->getOnlineId(),
|
||||||
StringUtils::wideToUtf8(reporter_npp->getName()).c_str(),
|
StringUtils::wideToUtf8(reporter_npp->getName()).c_str(),
|
||||||
StringUtils::wideToUtf8(info).c_str(),
|
StringUtils::wideToUtf8(info).c_str(),
|
||||||
|
Loading…
Reference in New Issue
Block a user