Class ServerWorldDatabase
java.lang.Object
zombie.network.ServerWorldDatabase
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
boolean
static ServerWorldDatabase
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addUserlog
(String username, Userlog.UserlogType type, String text, String issuedBy, int amount) addWarningPoint
(String username, String reason, int amount, String issuedBy) authClient
(long steamID) authClient
(String string0, String string2, String string1, long long0, int int0) authOwner
(long steamID, long ownerID) banSteamID
(String steamID, String reason, boolean ban) changePassword
(String string1, String string0) changeUsername
(String user, String newUsername) void
close()
void
connect()
boolean
boolean
containsUser
(String user) boolean
containsUser
(String string0, String string1) void
create()
static String
void
executeQuery
(String string, se.krka.kahlua.vm.KahluaTable kahluaTable) getDisplayName
(String username) getFirstBannedIPForUser
(String string0) getTableResult
(String table) getTickets
(String playerName) getTOTPCode
(String string0) getUserGoogleKey
(String string1) getUserlog
(String username) void
getUserlogUsers
(HashMap<String, NetworkUser> hashMap) getUserRoleNameByIp
(String string1) getUserRoleNameByUsername
(String string1) void
getWhitelistUsers
(HashMap<String, NetworkUser> hashMap) googleAuthClient
(String string0, String string1) grantAdmin
(String username, boolean setAdmin) isSteamIdBanned
(String string0) static boolean
isValidUserName
(String user) void
removeTicket
(int ticketID) removeUser
(String username) removeUser
(String string1, String string0) void
removeUserLog
(String username, String type, String text) void
resetUserGoogleKey
(String string) void
setPassword
(String username, String password) void
setUserGoogleKey
(String string1, String string0) setUserLastIP
(String string0, String string1) setUserSteamID
(String user, String steamID) void
updateDisplayName
(String user, String displayName) void
void
updateUserCounters
(Collection<NetworkUser> collection)
-
Field Details
-
AUTH_TYPE_USERNAME_PASSWORD
public static final int AUTH_TYPE_USERNAME_PASSWORD- See Also:
-
AUTH_TYPE_GOOGLE_AUTH
public static final int AUTH_TYPE_GOOGLE_AUTH- See Also:
-
AUTH_TYPE_TWO_FACTOR
public static final int AUTH_TYPE_TWO_FACTOR- See Also:
-
instance
-
CommandLineAdminUsername
-
CommandLineAdminPassword
-
doAdmin
public boolean doAdmin -
dbSchema
-
-
Constructor Details
-
ServerWorldDatabase
public ServerWorldDatabase()
-
-
Method Details
-
getDBSchema
-
executeQuery
public void executeQuery(String string, se.krka.kahlua.vm.KahluaTable kahluaTable) throws SQLException - Throws:
SQLException
-
getTableResult
- Throws:
SQLException
-
getWhitelistUsers
-
getUserlogUsers
-
updateUserCounters
-
containsUser
-
containsUser
-
containsCaseinsensitiveUser
-
changeUsername
- Throws:
SQLException
-
getTOTPCode
-
addUser
- Throws:
SQLException
-
addUser
- Throws:
SQLException
-
updateDisplayName
-
getDisplayName
-
removeUser
- Throws:
SQLException
-
removeUser
- Throws:
SQLException
-
removeUserLog
- Throws:
SQLException
-
connect
public void connect() -
create
- Throws:
SQLException
ClassNotFoundException
-
close
public void close() -
isValidUserName
-
googleAuthClient
-
authClient
public ServerWorldDatabase.LogonResult authClient(String string0, String string2, String string1, long long0, int int0) -
authClient
-
authOwner
-
encrypt
-
changePassword
- Throws:
SQLException
-
changePwd
- Throws:
SQLException
-
grantAdmin
- Throws:
SQLException
-
setRole
- Throws:
SQLException
-
getUserlog
-
addUserlog
public void addUserlog(String username, Userlog.UserlogType type, String text, String issuedBy, int amount) -
getUserRoleNameByUsername
-
getUserRoleNameByIp
- Throws:
SQLException
-
banUser
- Throws:
SQLException
-
getFirstBannedIPForUser
-
banIp
- Throws:
SQLException
-
isSteamIdBanned
-
banSteamID
- Throws:
SQLException
-
setUserLastIP
-
setUserSteamID
-
setPassword
- Throws:
SQLException
-
getUserGoogleKey
- Throws:
SQLException
-
setUserGoogleKey
- Throws:
SQLException
-
resetUserGoogleKey
- Throws:
SQLException
-
updateLastConnectionDate
-
addWarningPoint
public String addWarningPoint(String username, String reason, int amount, String issuedBy) throws SQLException - Throws:
SQLException
-
addTicket
- Throws:
SQLException
-
getBannedIPs
- Throws:
SQLException
-
getTickets
- Throws:
SQLException
-
removeTicket
- Throws:
SQLException
-