mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-12 03:52:35 +00:00
Allow local admin login
This commit is contained in:
parent
52276d06b0
commit
9c931ced4e
@ -177,6 +177,12 @@ Json::Value EQ::Net::WebsocketServer::Login(WebsocketServerConnection *connectio
|
|||||||
connection->SetAuthorized(true, r.account_name, r.account_id, 255);
|
connection->SetAuthorized(true, r.account_name, r.account_id, 255);
|
||||||
ret["status"] = "Ok";
|
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 {
|
else {
|
||||||
connection->SetAuthorized(false, "", 0, 0);
|
connection->SetAuthorized(false, "", 0, 0);
|
||||||
ret["status"] = "Not Authorized";
|
ret["status"] = "Not Authorized";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user