Class ServerWorldDatabase
java.lang.Object
zombie.network.ServerWorldDatabase
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intbooleanstatic ServerWorldDatabase -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddUserlog(String string1, Userlog.UserlogType userlogType, String string2, String string3, int int0) addWarningPoint(String string0, String string1, int int0, String string2) authClient(long long0) authClient(String string0, String string2, String string1, long long0, int int0) authOwner(long long0, long long1) banSteamID(String string0, String string1, boolean boolean0) changePassword(String string1, String string0) changeUsername(String string0, String string2) voidclose()voidconnect()booleancontainsCaseinsensitiveUser(String string) booleancontainsUser(String string) booleancontainsUser(String string0, String string1) voidcreate()static StringintgetDefaultRoleId(String string) getDisplayName(String string0) getFirstBannedIPForUser(String string0) getTickets(String string) getTOTPCode(String string0) getUserGoogleKey(String string1) getUserlog(String string) voidgetUserlogUsers(HashMap<String, NetworkUser> hashMap) getUserRoleNameByUsername(String string) voidgetWhitelistUsers(HashMap<String, NetworkUser> hashMap) googleAuthClient(String string0, String string1) isSteamIdBanned(String string0) static booleanisValidUserName(String string) voidvoidremoveRole(Role role0, Role role1) voidremoveTicket(int int0) removeUser(String string) removeUser(String string1, String string0) voidremoveUserLog(String string0, String string1, String string2) voidresetUserGoogleKey(String string) voidsaveDefaultRole(Role role, String string) voidvoidsaveRoleCapabilities(Role role) voidsetPassword(String string1, String string0) booleansetUserGoogleKey(String string0, String string1) setUserSteamID(String string0, String string1) voidupdateDisplayName(String string0, String string1) voidupdateLastConnectionDate(String string0, String string1) voidupdateUserCounters(Collection<NetworkUser> collection) voidviewedTicket(int int0, boolean boolean0)
-
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
-
-
Constructor Details
-
ServerWorldDatabase
public ServerWorldDatabase()
-
-
Method Details
-
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:
SQLExceptionClassNotFoundException
-
close
public void close() -
isValidUserName
-
saveRole
-
removeRole
-
saveDefaultRole
-
getDefaultRoleId
-
saveRoleCapabilities
-
loadRoles
-
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
-
setRole
- Throws:
SQLException
-
getUserlog
-
addUserlog
public void addUserlog(String string1, Userlog.UserlogType userlogType, String string2, String string3, int int0) -
getUserRoleNameByUsername
-
banUser
- Throws:
SQLException
-
getFirstBannedIPForUser
-
banIp
public String banIp(String string0, String string1, String string2, boolean boolean0) throws SQLException - Throws:
SQLException
-
isSteamIdBanned
-
banSteamID
- Throws:
SQLException
-
setUserSteamID
-
setPassword
- Throws:
SQLException
-
getUserGoogleKey
- Throws:
SQLException
-
setUserGoogleKey
- Throws:
SQLException
-
resetUserGoogleKey
- Throws:
SQLException
-
updateLastConnectionDate
-
addWarningPoint
public String addWarningPoint(String string0, String string1, int int0, String string2) throws SQLException - Throws:
SQLException
-
addTicket
- Throws:
SQLException
-
viewedTicket
- Throws:
SQLException
-
getBannedIPs
- Throws:
SQLException
-
getBannedSteamIDs
- Throws:
SQLException
-
getTickets
- Throws:
SQLException
-
removeTicket
- Throws:
SQLException
-