Help converting this code to work after logging out.
Code:
private void processLoginScreenInput() {
if (this.loginScreenState == 0) {
int l = super.myHeight / 2 + 20;
l += 20;
int i = this.myHeight / 2 - 40;
i += 30;
i += 25;
resetImage();
if (super.clickMode3 == 1 && super.saveClickX >= 276
&& super.saveClickX <= 490 && super.saveClickY >= 194
&& super.saveClickY <= 223)
loginScreenCursorPos = 0;
if (super.clickMode3 == 1 && super.mouseX >= 276
&& super.mouseX <= 490 && super.mouseY >= 240
&& super.mouseY <= 270)
loginScreenCursorPos = 1;
if (super.clickMode3 == 1 && super.saveClickX >= 295
&& super.saveClickX <= 474 && super.saveClickY >= 301
&& super.saveClickY <= 325) {
loginFailures = 0;
if ((myUsername.length() > 0) && (myPassword.length() > 0)) {
login(myUsername, myPassword, false);
} else {
this.loginScreenCursorPos = 0;
this.loginMessage1 = "Username & Password";
this.loginMessage2 = "Must be more than 1 character";
}
if (this.loggedIn)
return;
}
do {
int l1 = readChar(-796);
if (l1 == -1)
break;
boolean flag1 = false;
for (int i2 = 0; i2 < validUserPassChars.length(); i2++) {
if (l1 != validUserPassChars.charAt(i2))
continue;
flag1 = true;
break;
}
if (loginScreenCursorPos == 0) {
if (l1 == 8 && myUsername.length() > 0)
myUsername = myUsername.substring(0,
myUsername.length() - 1);
if (l1 == 9 || l1 == 10 || l1 == 13)
loginScreenCursorPos = 1;
if (flag1)
myUsername += (char) l1;
if (myUsername.length() > 12)
myUsername = myUsername.substring(0, 12);
} else if (loginScreenCursorPos == 1) {
if (l1 == 8 && myPassword.length() > 0)
myPassword = myPassword.substring(0,
myPassword.length() - 1);
if (l1 == 9 || l1 == 10 || l1 == 13)
loginScreenCursorPos = 0;
if (flag1)
myPassword += (char) l1;
if (myPassword.length() > 20)
myPassword = myPassword.substring(0, 20);
}
} while (true);
return;
}
if (loginScreenState == 3) {
int k = super.myWidth / 2;
int j1 = super.myHeight / 2 + 50;
j1 += 20;
if (super.clickMode3 == 1 && super.saveClickX >= k - 75
&& super.saveClickX <= k + 75
&& super.saveClickY >= j1 - 20
&& super.saveClickY <= j1 + 20)
loginScreenState = 0;
}
}
This code prevents me from being able to type after I log out. I have to reload my client to login again.