Fixed spawning in the buildout buildings, fixed gm permissions, added command to lock and unlock server for gms

This commit is contained in:
Light2
2013-12-15 01:31:15 +01:00
parent a35aad38e8
commit 1e68c71177
9 changed files with 139 additions and 20 deletions
+3 -2
View File
@@ -209,9 +209,10 @@ public class LoginService implements INetworkDispatch{
public boolean checkForGmPermission(int id) {
PreparedStatement preparedStatement;
try {
preparedStatement = databaseConnection1.preparedStatement("SELECT * FROM characters WHERE \"accountId\"=" + id + "");
preparedStatement = databaseConnection1.preparedStatement("SELECT * FROM accounts WHERE id=" + id + "");
ResultSet resultSet = preparedStatement.executeQuery();
return resultSet.getBoolean("gmflag");
if(resultSet.next())
return resultSet.getBoolean("gmflag");
} catch (SQLException e) {
e.printStackTrace();
}