C# Class TrinityCore_Manager.Database.AuthDatabase

Inheritance: MySqlDatabase
Mostra file Open project: TrinityCore-Manager/TrinityCore-Manager-v3 Class Usage Examples

Public Methods

Method Description
AddIpBan ( string ip, System.DateTime bandate, System.DateTime unbandate, string bannedby, string banreason ) : System.Threading.Tasks.Task
AuthDatabase ( string serverHost, int port, string username, string password, string dbName ) : System
BanAccount ( int id, int bandate, int unbandate, string bannedBy, string banReason ) : System.Threading.Tasks.Task
BanAccount ( string username, int bandate, int unbandate, string bannedBy, string banReason ) : System.Threading.Tasks.Task
BanIp ( string ip, int bandate, int unbandate, string bannedby, string banreason ) : System.Threading.Tasks.Task
ChangeAccountExpansion ( int accountId, Expansion exp ) : System.Threading.Tasks.Task
ChangeAccountExpansion ( string username, Expansion exp ) : System.Threading.Tasks.Task
ChangeAccountPassword ( int accountId, string password ) : System.Threading.Tasks.Task
ChangeAccountPassword ( string username, string password ) : System.Threading.Tasks.Task
CleanupAccounts ( System.DateTime lastLogin ) : Task
CreateAccount ( string username, string password, int gmlevel, int expansion, string email = "" ) : Task
DeleteAccount ( int id ) : System.Threading.Tasks.Task
EditAccount ( int id, string username, string password, string email, GMLevel lvl, Expansion exp ) : System.Threading.Tasks.Task

Modify an account

GetAccount ( int acctId ) : Task
GetAccount ( string username ) : Task
GetAccountAccess ( int accountId ) : Task
GetAccounts ( ) : Task>
GetBannedAccount ( int userId ) : Task
GetBannedAccounts ( ) : Task>
GetIPBan ( string ip ) : Task
GetIPBans ( ) : Task>
GetOnlineAccounts ( ) : Task>
GetPlayersOnlineCount ( ) : Task
RemoveAccountBan ( int id ) : System.Threading.Tasks.Task
RemoveIpBan ( string ip ) : System.Threading.Tasks.Task
SearchForAccount ( string like ) : Task>
SearchForBannedAccount ( string like ) : Task>
SetAccountLock ( int accountId, bool locked ) : System.Threading.Tasks.Task
SetAccountLock ( string username, bool locked ) : System.Threading.Tasks.Task
SetGMLevel ( int accountId, GMLevel level, int realmid ) : System.Threading.Tasks.Task
SetGMLevel ( string username, GMLevel level, int realmid ) : System.Threading.Tasks.Task

Private Methods

Method Description
BuildAccount ( DataRow row ) : Account
BuildAccountBan ( DataRow row ) : BannedAccount
BuildIPBan ( DataRow row ) : IPBan

Method Details

AddIpBan() public method

public AddIpBan ( string ip, System.DateTime bandate, System.DateTime unbandate, string bannedby, string banreason ) : System.Threading.Tasks.Task
ip string
bandate System.DateTime
unbandate System.DateTime
bannedby string
banreason string
return System.Threading.Tasks.Task

AuthDatabase() public method

public AuthDatabase ( string serverHost, int port, string username, string password, string dbName ) : System
serverHost string
port int
username string
password string
dbName string
return System

BanAccount() public method

public BanAccount ( int id, int bandate, int unbandate, string bannedBy, string banReason ) : System.Threading.Tasks.Task
id int
bandate int
unbandate int
bannedBy string
banReason string
return System.Threading.Tasks.Task

BanAccount() public method

public BanAccount ( string username, int bandate, int unbandate, string bannedBy, string banReason ) : System.Threading.Tasks.Task
username string
bandate int
unbandate int
bannedBy string
banReason string
return System.Threading.Tasks.Task

BanIp() public method

public BanIp ( string ip, int bandate, int unbandate, string bannedby, string banreason ) : System.Threading.Tasks.Task
ip string
bandate int
unbandate int
bannedby string
banreason string
return System.Threading.Tasks.Task

ChangeAccountExpansion() public method

public ChangeAccountExpansion ( int accountId, Expansion exp ) : System.Threading.Tasks.Task
accountId int
exp Expansion
return System.Threading.Tasks.Task

ChangeAccountExpansion() public method

public ChangeAccountExpansion ( string username, Expansion exp ) : System.Threading.Tasks.Task
username string
exp Expansion
return System.Threading.Tasks.Task

ChangeAccountPassword() public method

public ChangeAccountPassword ( int accountId, string password ) : System.Threading.Tasks.Task
accountId int
password string
return System.Threading.Tasks.Task

ChangeAccountPassword() public method

public ChangeAccountPassword ( string username, string password ) : System.Threading.Tasks.Task
username string
password string
return System.Threading.Tasks.Task

CleanupAccounts() public method

public CleanupAccounts ( System.DateTime lastLogin ) : Task
lastLogin System.DateTime
return Task

CreateAccount() public method

public CreateAccount ( string username, string password, int gmlevel, int expansion, string email = "" ) : Task
username string
password string
gmlevel int
expansion int
email string
return Task

DeleteAccount() public method

public DeleteAccount ( int id ) : System.Threading.Tasks.Task
id int
return System.Threading.Tasks.Task

EditAccount() public method

Modify an account
public EditAccount ( int id, string username, string password, string email, GMLevel lvl, Expansion exp ) : System.Threading.Tasks.Task
id int The id of the account
username string The new username for the account
password string The new password for the account
email string The new email for the account
lvl GMLevel The new GM level for the account
exp Expansion The new expansion for the account
return System.Threading.Tasks.Task

GetAccount() public method

public GetAccount ( int acctId ) : Task
acctId int
return Task

GetAccount() public method

public GetAccount ( string username ) : Task
username string
return Task

GetAccountAccess() public method

public GetAccountAccess ( int accountId ) : Task
accountId int
return Task

GetAccounts() public method

public GetAccounts ( ) : Task>
return Task>

GetBannedAccount() public method

public GetBannedAccount ( int userId ) : Task
userId int
return Task

GetBannedAccounts() public method

public GetBannedAccounts ( ) : Task>
return Task>

GetIPBan() public method

public GetIPBan ( string ip ) : Task
ip string
return Task

GetIPBans() public method

public GetIPBans ( ) : Task>
return Task>

GetOnlineAccounts() public method

public GetOnlineAccounts ( ) : Task>
return Task>

GetPlayersOnlineCount() public method

public GetPlayersOnlineCount ( ) : Task
return Task

RemoveAccountBan() public method

public RemoveAccountBan ( int id ) : System.Threading.Tasks.Task
id int
return System.Threading.Tasks.Task

RemoveIpBan() public method

public RemoveIpBan ( string ip ) : System.Threading.Tasks.Task
ip string
return System.Threading.Tasks.Task

SearchForAccount() public method

public SearchForAccount ( string like ) : Task>
like string
return Task>

SearchForBannedAccount() public method

public SearchForBannedAccount ( string like ) : Task>
like string
return Task>

SetAccountLock() public method

public SetAccountLock ( int accountId, bool locked ) : System.Threading.Tasks.Task
accountId int
locked bool
return System.Threading.Tasks.Task

SetAccountLock() public method

public SetAccountLock ( string username, bool locked ) : System.Threading.Tasks.Task
username string
locked bool
return System.Threading.Tasks.Task

SetGMLevel() public method

public SetGMLevel ( int accountId, GMLevel level, int realmid ) : System.Threading.Tasks.Task
accountId int
level GMLevel
realmid int
return System.Threading.Tasks.Task

SetGMLevel() public method

public SetGMLevel ( string username, GMLevel level, int realmid ) : System.Threading.Tasks.Task
username string
level GMLevel
realmid int
return System.Threading.Tasks.Task