mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 08:21:28 +00:00
SetAccountStatus converted to StringFormat
This commit is contained in:
parent
74b73e6f39
commit
4a10bdb91a
@ -336,13 +336,11 @@ bool Database::SetLocalPassword(uint32 accid, const char* password) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Database::SetAccountStatus(const char* name, int16 status) {
|
bool Database::SetAccountStatus(const char* name, int16 status) {
|
||||||
char *query = nullptr;
|
std::string query = StringFormat("UPDATE account SET status=%i WHERE name='%s';", status, name);
|
||||||
|
|
||||||
std::cout << "Account being GM Flagged:" << name << ", Level: " << (int16) status << std::endl;
|
std::cout << "Account being GM Flagged:" << name << ", Level: " << (int16) status << std::endl;
|
||||||
|
|
||||||
auto results = QueryDatabase(query, MakeAnyLenString(&query, "UPDATE account SET status=%i WHERE name='%s';", status, name));
|
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