mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-09 09:12:25 +00:00
AddGMIP converted to QueryDatabase
This commit is contained in:
parent
cbf49b303b
commit
418e4ffee8
@ -239,15 +239,13 @@ bool Database::AddBannedIP(char* bannedIP, const char* notes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Database::AddGMIP(char* ip_address, char* name) {
|
bool Database::AddGMIP(char* ip_address, char* name) {
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char *query = nullptr;
|
||||||
char *query = 0;
|
|
||||||
|
auto results = QueryDatabase(query, MakeAnyLenString(&query, "INSERT into `gm_ips` SET `ip_address` = '%s', `name` = '%s'", ip_address, name));
|
||||||
|
|
||||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT into `gm_ips` SET `ip_address` = '%s', `name` = '%s'", ip_address, name), errbuf)) {
|
|
||||||
safe_delete_array(query);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
return true;
|
|
||||||
|
return results.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Database::LoginIP(uint32 AccountID, const char* LoginIP)
|
void Database::LoginIP(uint32 AccountID, const char* LoginIP)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user