Merge remote-tracking branch 'origin/feature/eqemu-api-data-service-netstats-ws' into unstable

This commit is contained in:
KimLS
2019-06-24 17:45:37 -07:00
13 changed files with 218 additions and 66 deletions
+6
View File
@@ -177,6 +177,12 @@ Json::Value EQ::Net::WebsocketServer::Login(WebsocketServerConnection *connectio
connection->SetAuthorized(true, r.account_name, r.account_id, 255);
ret["status"] = "Ok";
}
else if (user == "admin" && (connection->RemoteIP() == "127.0.0.1" || connection->RemoteIP() == "::")) {
r.logged_in = true;
r.account_id = 0;
connection->SetAuthorized(true, r.account_name, r.account_id, 255);
ret["status"] = "Ok";
}
else {
connection->SetAuthorized(false, "", 0, 0);
ret["status"] = "Not Authorized";