EvEmu
0.8.4
11 September 2021
|
#include "ServiceDB.h"
Public Member Functions | |
uint32 | GetStationOwner (uint32 stationID) |
Static Public Member Functions | |
static bool | GetAccountInformation (CryptoChallengePacket &ccp, AccountData &aData, std::string &failMsg) |
static bool | UpdateAccountHash (const char *username, std::string &hash) |
static bool | IncrementLoginCount (uint32 accountID) |
static void | UpdatePassword (uint32 accountID, const char *pass) |
static void | SaveKillOrLoss (CharKillData &data) |
static bool | GetConstant (const char *name, uint32 &into) |
static void | SetServerOnlineStatus (bool online=false) |
static void | SetCharacterOnlineStatus (uint32 char_id, bool online=false) |
static void | SetAccountOnlineStatus (uint32 accountID, bool online=false) |
static void | SetAccountBanStatus (uint32 accountID, bool banned=false) |
static void | SaveServerStats (double threads, float rss, float vm, float user, float kernel, uint32 items, uint32 bubbles) |
static uint32 | SetClientSeed () |
static PyRep * | LookupChars (const char *match, bool exact=false) |
static PyRep * | LookupOwners (const char *match, bool exact=false) |
static PyRep * | LookupCorporations (const std::string &) |
static PyRep * | LookupFactions (const std::string &) |
static PyRep * | LookupCorporationTickers (const std::string &) |
static PyRep * | LookupStations (const std::string &) |
static PyRep * | LookupKnownLocationsByGroup (const std::string &, uint32) |
static PyRep * | PrimeOwners (std::vector< int32 > &itemIDs) |
static bool | ValidateAccountName (CryptoChallengePacket &ccp, std::string &failMsg) |
static void | GetCorpHangarNames (uint32 corpID, std::map< uint8, std::string > &hangarNames) |
Protected Member Functions | |
void | ProcessStringChange (const char *key, const std::string &oldValue, std::string newValue, PyDict *notif, std::vector< std::string > &dbQ) |
void | ProcessRealChange (const char *key, double oldValue, double newValue, PyDict *notif, std::vector< std::string > &dbQ) |
void | ProcessIntChange (const char *key, uint32 oldValue, uint32 newValue, PyDict *notif, std::vector< std::string > &dbQ) |
void | ProcessLongChange (const char *key, int64 oldValue, int64 newValue, PyDict *notif, std::vector< std::string > &dbQ) |
Static Protected Member Functions | |
static uint32 | CreateNewAccount (const char *login, const char *pass, const char *passHash, int64 role) |
This object is the home for common DB operations which may be needed by many different service objects. It should be inherited by each serviceDB implementation.
it's also in need of an overhaul.
Definition at line 41 of file ServiceDB.h.
|
staticprotected |
CreateNewAccount
This method is part of the "autoAccount" creation patch by firefoxpdm. This will insert a new account row into the database if the account name doesn't exist at login.
login | is a const char string containing the name. |
pass | is a const char string containing the password. |
role | is the users role in the game. |
Definition at line 151 of file ServiceDB.cpp.
References DBerror::c_str(), sDatabase, sEntityList, and sLog.
Referenced by GetAccountInformation().
|
static |
Definition at line 70 of file ServiceDB.cpp.
References AccountData::banned, DBerror::c_str(), AccountData::clientID, CreateNewAccount(), DBQueryResult::error, DBResultRow::GetInt(), DBResultRow::GetInt64(), DBQueryResult::GetRow(), DBResultRow::GetText(), DBResultRow::GetUInt(), AccountData::hash, AccountData::id, DBResultRow::IsNull(), AccountData::last_login, AccountData::name, AccountData::online, AccountData::password, AccountData::role, sConfig, sDatabase, sLog, AccountData::type, and AccountData::visits.
Referenced by Client::_VerifyLogin().
|
static |
Definition at line 242 of file ServiceDB.cpp.
References _log, DBerror::c_str(), codelog, DBQueryResult::error, DBQueryResult::GetRow(), DBResultRow::GetUInt(), and sDatabase.
|
static |
Definition at line 567 of file ServiceDB.cpp.
References _log, codelog, flagCorpHangar2, flagCorpHangar3, flagCorpHangar4, flagCorpHangar5, flagCorpHangar6, flagCorpHangar7, flagHangar, DBQueryResult::GetRow(), DBResultRow::GetText(), IsNPCCorp, and sDatabase.
Referenced by Command_cargo().
Definition at line 226 of file ServiceDB.cpp.
References DBerror::c_str(), codelog, DBQueryResult::error, DBResultRow::GetInt(), DBQueryResult::GetRow(), and sDatabase.
|
static |
Definition at line 140 of file ServiceDB.cpp.
References sDatabase, and sLog.
Referenced by Client::SelectCharacter().
|
static |
Definition at line 358 of file ServiceDB.cpp.
References _log, DBerror::c_str(), DBResultToRowset(), DBQueryResult::error, maxNPCItem, and sDatabase.
|
static |
Definition at line 445 of file ServiceDB.cpp.
References _log, DBerror::c_str(), DBResultToRowset(), DBQueryResult::error, and sDatabase.
|
static |
Definition at line 483 of file ServiceDB.cpp.
References _log, DBerror::c_str(), DBResultToRowset(), DBQueryResult::error, and sDatabase.
|
static |
Definition at line 464 of file ServiceDB.cpp.
References _log, DBerror::c_str(), DBResultToRowset(), DBQueryResult::error, and sDatabase.
Definition at line 521 of file ServiceDB.cpp.
References _log, DBerror::c_str(), DBResultToRowset(), DBQueryResult::error, and sDatabase.
|
static |
Definition at line 391 of file ServiceDB.cpp.
References DBResultToRowset(), and sDatabase.
|
static |
Definition at line 502 of file ServiceDB.cpp.
References _log, DBerror::c_str(), DBResultToRowset(), DBQueryResult::error, and sDatabase.
Definition at line 540 of file ServiceDB.cpp.
References PyList::AddItem(), DBResultRow::GetInt(), DBQueryResult::GetRow(), DBResultRow::GetText(), IsAlliance, IsCharacterID, IsPlayerCorp, sDatabase, and PyDict::SetItem().
|
protected |
Definition at line 304 of file ServiceDB.cpp.
References PyTuple::items, and PyDict::SetItemString().
Referenced by CorporationDB::UpdateLogo().
|
protected |
Definition at line 320 of file ServiceDB.cpp.
References PyTuple::items, and PyDict::SetItemString().
Referenced by CorporationDB::UpdateTitle().
|
protected |
Definition at line 287 of file ServiceDB.cpp.
References PyTuple::items, and PyDict::SetItemString().
Referenced by CorporationDB::UpdateCorporation().
|
protected |
Definition at line 266 of file ServiceDB.cpp.
References PyTuple::items, key(), sDatabase, and PyDict::SetItemString().
Referenced by CorporationDB::UpdateCorporation(), CorporationDB::UpdateDivisionNames(), and CorporationDB::UpdateTitle().
|
static |
Definition at line 212 of file ServiceDB.cpp.
References CharKillData::finalAllianceID, CharKillData::finalCharacterID, CharKillData::finalCorporationID, CharKillData::finalDamageDone, CharKillData::finalFactionID, CharKillData::finalSecurityStatus, CharKillData::finalShipTypeID, CharKillData::finalWeaponTypeID, CharKillData::killBlob, CharKillData::killTime, CharKillData::moonID, sDatabase, CharKillData::solarSystemID, CharKillData::victimAllianceID, CharKillData::victimCharacterID, CharKillData::victimCorporationID, CharKillData::victimDamageTaken, CharKillData::victimFactionID, and CharKillData::victimShipTypeID.
Referenced by CustomsSE::Killed(), StructureSE::Killed(), and Character::LogKill().
|
static |
Definition at line 336 of file ServiceDB.cpp.
References _log, sDatabase, and sEntityList.
Referenced by ConsoleCommand::UpdateStatus().
|
static |
Definition at line 205 of file ServiceDB.cpp.
References DBerror::c_str(), codelog, and sDatabase.
Referenced by Client::BanClient(), and Command_unban().
|
static |
Definition at line 198 of file ServiceDB.cpp.
References DBerror::c_str(), codelog, and sDatabase.
Referenced by Client::SelectCharacter(), and Client::~Client().
|
static |
Definition at line 177 of file ServiceDB.cpp.
References _log, and sDatabase.
Referenced by Client::SelectCharacter(), and Client::~Client().
|
static |
Definition at line 34 of file ServiceDB.cpp.
References DBResultRow::GetInt(), DBQueryResult::GetRow(), and sDatabase.
Referenced by EntityList::Initialize().
|
static |
Definition at line 186 of file ServiceDB.cpp.
References sDatabase.
Referenced by CleanUp(), and main().
|
static |
Definition at line 125 of file ServiceDB.cpp.
References DBerror::c_str(), sDatabase, and sLog.
|
static |
Definition at line 170 of file ServiceDB.cpp.
References sDatabase.
Referenced by Client::_VerifyLogin().
|
static |
Definition at line 43 of file ServiceDB.cpp.
References badChars, and EvE::icontains().
Referenced by Client::_VerifyLogin().