mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-25 21:02:26 +00:00
CheckGMIPs converted to StringFormat
This commit is contained in:
parent
0ddceb78ba
commit
a036200369
@ -213,11 +213,9 @@ bool Database::AddBannedIP(char* bannedIP, const char* notes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Database::CheckGMIPs(const char* ip_address, uint32 account_id) {
|
bool Database::CheckGMIPs(const char* ip_address, uint32 account_id) {
|
||||||
char *query = nullptr;
|
std::string query = StringFormat("SELECT * FROM `gm_ips` WHERE `ip_address` = '%s' AND `account_id` = %i", ip_address, account_id);
|
||||||
|
|
||||||
auto results = QueryDatabase(query, MakeAnyLenString(&query, "SELECT * FROM `gm_ips` WHERE `ip_address` = '%s' AND `account_id` = %i", ip_address, account_id));
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
safe_delete_array(query);
|
|
||||||
|
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user