mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 18:46:37 +00:00
Post merge Log.Out converts and header/linker fixes
This commit is contained in:
@@ -2051,3 +2051,27 @@ void SharedDatabase::SetBotInspectMessage(uint32 botid, const InspectMessage_Str
|
||||
std::string query = StringFormat("UPDATE bots SET BotInspectMessage = '%s' WHERE BotID = %i", msg.c_str(), botid);
|
||||
QueryDatabase(query);
|
||||
}
|
||||
|
||||
bool SharedDatabase::VerifyToken(std::string token, int& status) {
|
||||
status = 0;
|
||||
if (token.length() > 64) {
|
||||
token = token.substr(0, 64);
|
||||
}
|
||||
|
||||
token = EscapeString(token);
|
||||
std::string query = StringFormat("SELECT status FROM tokens WHERE token='%s'", token.c_str());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
{
|
||||
std::cerr << "Error in SharedDatabase::VerifyToken query '" << query << "' " << results.ErrorMessage() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (results.RowCount() != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto row = results.begin();
|
||||
status = atoi(row[0]);
|
||||
return true;
|
||||
}
|
||||
@@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "../common/debug.h"
|
||||
#include "../common/global_define.h"
|
||||
#include "web_interface_utils.h"
|
||||
#include "rapidjson/writer.h"
|
||||
#include "rapidjson/stringbuffer.h"
|
||||
|
||||
@@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#ifndef COMMON_WEBINTUTIL_H
|
||||
#define COMMON_WEBINTUTIL_H
|
||||
|
||||
#include "../common/debug.h"
|
||||
#include "../common/global_define.h"
|
||||
#include "rapidjson/writer.h"
|
||||
#include "rapidjson/stringbuffer.h"
|
||||
#include <iostream>
|
||||
|
||||
Reference in New Issue
Block a user