
02-02-2009, 04:25 PM
|
Sarnak
|
|
Join Date: Jan 2009
Location: canada
Posts: 68
|
|
Is that the database.cpp file if so what do I change?
Quote:
bool Database::SetAccountStatus(const char* name, sint16 status) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
int32 affected_rows = 0;
cout << "Account being GM Flagged:" << name << ", Level: " << (sint16) status << endl;
if (!RunQuery(query, MakeAnyLenString(&query, "UPDATE account SET status=%i WHERE name='%s';", status, name), errbuf, 0, &affected_rows)) {
safe_delete_array(query);
return false;
}
safe_delete_array(query);
if (affected_rows == 0) {
cout << "Account: " << name << " does not exist, therefore it cannot be flagged\n";
return false;
}
return true;
}
|
|