mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-12 01:21:20 -07:00
Merge branch 'login' into 'master'
Small login corrections See merge request 2009scape/2009scape!2195
This commit is contained in:
commit
a37abb7444
2 changed files with 20 additions and 26 deletions
|
|
@ -326,7 +326,6 @@ public class Player extends Entity {
|
||||||
public void init() {
|
public void init() {
|
||||||
if (!artificial) {
|
if (!artificial) {
|
||||||
log(this.getClass(), Log.INFO, getUsername() + " initialising...");
|
log(this.getClass(), Log.INFO, getUsername() + " initialising...");
|
||||||
getDetails().getSession().setObject(this);
|
|
||||||
}
|
}
|
||||||
super.init();
|
super.init();
|
||||||
LoginConfiguration.configureLobby(this);
|
LoginConfiguration.configureLobby(this);
|
||||||
|
|
|
||||||
|
|
@ -33,15 +33,13 @@ class LoginParser(val details: PlayerDetails) {
|
||||||
Repository.removePlayer(player)
|
Repository.removePlayer(player)
|
||||||
flag(AuthResponse.ErrorLoadingProfile)
|
flag(AuthResponse.ErrorLoadingProfile)
|
||||||
}
|
}
|
||||||
GameWorld.Pulser.submit(object : Pulse(1) {
|
|
||||||
override fun pulse(): Boolean {
|
|
||||||
try {
|
try {
|
||||||
if (details.session.isActive) {
|
if (details.session.isActive) {
|
||||||
player.properties.spawnLocation = getAttribute(player, "/save:spawnLocation", ServerConstants.HOME_LOCATION)
|
player.properties.spawnLocation = getAttribute(player, "/save:spawnLocation", ServerConstants.HOME_LOCATION)
|
||||||
loginListeners.forEach(Consumer { listener: LoginListener -> listener.login(player) }) //Run our login hooks
|
loginListeners.forEach(Consumer { listener: LoginListener -> listener.login(player) }) //Run our login hooks
|
||||||
parser.runContentHooks() //Run our saved-content-parsing hooks
|
parser.runContentHooks() //Run our saved-content-parsing hooks
|
||||||
player.details.session.setObject(player)
|
player.details.session.setObject(player)
|
||||||
player.getDetails().accountInfo.lastUsedIp = player.getDetails().getIpAddress()
|
player.details.accountInfo.lastUsedIp = player.details.ipAddress
|
||||||
if (reconnect) {
|
if (reconnect) {
|
||||||
reconnect(player)
|
reconnect(player)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -57,9 +55,6 @@ class LoginParser(val details: PlayerDetails) {
|
||||||
Repository.removePlayer(player)
|
Repository.removePlayer(player)
|
||||||
flag(AuthResponse.ErrorLoadingProfile)
|
flag(AuthResponse.ErrorLoadingProfile)
|
||||||
}
|
}
|
||||||
return true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue