1
0
mirror of https://github.com/moparisthebest/xAuth synced 2024-12-22 07:08:51 -05:00

Resetting of active status to 0 upon disconnect fixed

This commit is contained in:
Zach Iverson 2011-06-20 06:40:55 -04:00
parent 78e827eade
commit ce9757e2d5
2 changed files with 7 additions and 2 deletions

View File

@ -48,7 +48,12 @@ public class LoginCommand implements CommandExecutor {
xAuthMessages.send("loginErrPassword", player);
return true;
//} else if (xAuthSettings.activation && account.getActive() == 0) {
} else if (xAuthSettings.activation && plugin.getDataManager().getActive(player.getName()) == 0) {
}
int active = plugin.getDataManager().getActive(player.getName());
account.setActive(active);
if (xAuthSettings.activation && active == 0) {
xAuthMessages.send("loginErrActivate", player);
return true;
}

View File

@ -195,7 +195,7 @@ public class DataManager {
prepStmt = connection.prepareStatement(
"SELECT `active`" +
" FROM `" + xAuthSettings.tblAccount + "`" +
" WHERE playername = ?"
" WHERE `playername` = ?"
);
prepStmt.setString(1, playerName);
rs = prepStmt.executeQuery();