mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-20 02:33:53 +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);
|
||||
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";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user