Package zombie.network
Class ServerWorldDatabase
java.lang.Object
zombie.network.ServerWorldDatabase
Created by LEMMYPC on 14/01/14.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
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 user, String pass, String ip, long steamID) authOwner
(long steamID, long ownerID) banSteamID
(String steamID, String reason, boolean ban) changeUsername
(String user, String newUsername) void
close()
boolean
boolean
containsUser
(String user) void
create()
static String
void
executeQuery
(String query, se.krka.kahlua.vm.KahluaTable params) getDisplayName
(String username) getTableResult
(String table) getTickets
(String playerName) getUserlog
(String username) grantAdmin
(String username, boolean setAdmin) static boolean
isValidUserName
(String user) void
removeTicket
(int ticketID) removeUser
(String username) void
removeUserLog
(String username, String type, String text) void
void
saveTransactionID
(String username, Integer transactionID) setAccessLevel
(String username, String accessLevel) void
setPassword
(String username, String password) setUserSteamID
(String user, String steamID) void
updateDisplayName
(String user, String displayName) void
-
Field Details
-
instance
-
CommandLineAdminUsername
-
CommandLineAdminPassword
-
doAdmin
public boolean doAdmin -
dbSchema
-
-
Constructor Details
-
ServerWorldDatabase
public ServerWorldDatabase()
-
-
Method Details
-
getDBSchema
-
executeQuery
- Throws:
SQLException
-
getTableResult
- Throws:
SQLException
-
saveAllTransactionsID
-
saveTransactionID
-
containsUser
-
containsCaseinsensitiveUser
-
changeUsername
- Throws:
SQLException
-
addUser
- Throws:
SQLException
-
updateDisplayName
-
getDisplayName
-
removeUser
- Throws:
SQLException
-
removeUserLog
- Throws:
SQLException
-
create
- Throws:
SQLException
ClassNotFoundException
-
close
public void close() -
isValidUserName
-
authClient
public ServerWorldDatabase.LogonResult authClient(String user, String pass, String ip, long steamID) -
authClient
-
authOwner
-
encrypt
-
changePwd
- Throws:
SQLException
-
grantAdmin
- Throws:
SQLException
-
setAccessLevel
- Throws:
SQLException
-
getUserlog
-
addUserlog
public void addUserlog(String username, Userlog.UserlogType type, String text, String issuedBy, int amount) -
banUser
- Throws:
SQLException
-
banIp
- Throws:
SQLException
-
banSteamID
- Throws:
SQLException
-
setUserSteamID
-
setPassword
- Throws:
SQLException
-
updateLastConnectionDate
-
addWarningPoint
public String addWarningPoint(String username, String reason, int amount, String issuedBy) throws SQLException - Throws:
SQLException
-
addTicket
- Throws:
SQLException
-
getTickets
- Throws:
SQLException
-
removeTicket
- Throws:
SQLException
-