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 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) void
close()
void
connect()
boolean
containsCaseinsensitiveUser
(String string) boolean
containsUser
(String string) boolean
containsUser
(String string0, String string1) void
create()
static String
int
getDefaultRoleId
(String string) getDisplayName
(String string0) getFirstBannedIPForUser
(String string0) getTickets
(String string) getTOTPCode
(String string0) getUserGoogleKey
(String string1) getUserlog
(String string) void
getUserlogUsers
(HashMap<String, NetworkUser> hashMap) getUserRoleNameByUsername
(String string) void
getWhitelistUsers
(HashMap<String, NetworkUser> hashMap) googleAuthClient
(String string0, String string1) isSteamIdBanned
(String string0) static boolean
isValidUserName
(String string) void
void
removeRole
(Role role0, Role role1) void
removeTicket
(int int0) removeUser
(String string) removeUser
(String string1, String string0) void
removeUserLog
(String string0, String string1, String string2) void
resetUserGoogleKey
(String string) void
saveDefaultRole
(Role role, String string) void
void
saveRoleCapabilities
(Role role) void
setPassword
(String string1, String string0) boolean
setUserGoogleKey
(String string0, String string1) setUserSteamID
(String string0, String string1) void
updateDisplayName
(String string0, String string1) void
updateLastConnectionDate
(String string0, String string1) void
updateUserCounters
(Collection<NetworkUser> collection) void
viewedTicket
(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:
SQLException
ClassNotFoundException
-
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
-