C# Class BF2Statistics.Database.GamespyDatabase

A class to provide common tasks against the Gamespy Login Database
Inheritance: BF2Statistics.Database.DatabaseDriver, IDisposable
Afficher le fichier Open project: BF2Statistics/ControlCenter Class Usage Examples

Méthodes publiques

Свойство Type Description
LatestVersion System.Version

Méthodes publiques

Méthode Description
CreateSqlTables ( ) : void

Tells the Database to install the Stats tables into the database

CreateUser ( int Pid, string Nick, string Pass, string Email, string Country ) : bool

Creates a new Gamespy Account

Only used in the Gamespy Account Creation Form

CreateUser ( string Nick, string Pass, string Email, string Country ) : int

Creates a new Gamespy Account

Used by the login server when a create account request is made

DeleteUser ( int Pid ) : int

Deletes a Gamespy Account

DeleteUser ( string Nick ) : int

Deletes a Gamespy Account

GamespyDatabase ( ) : System

Creates a new connection to the Gamespy Database

GetNumAccounts ( ) : int

Returns the number of accounts in the database

GetPlayerId ( string Nick ) : int

Fetches a Gamespy Account id from an account name

GetUser ( int Pid ) : object>.Dictionary

Fetches an account from the gamespy database

GetUser ( string Nick ) : object>.Dictionary

Fetches an account from the gamespy database

GetUsersByEmailPass ( string Email, string Password ) : object>>.List

Fetches an account from the gamespy database

GetUsersLike ( string Nick ) : List

Returns a list of player names that are similar to the passed parameter

MigrateTables ( ) : void

If there is any table updates that need to be applied, calling this method will apply each update until the current database version is up to date

SetPlayerId ( string Nick, int Pid ) : int

Sets the Account (Player) Id for an account by Name

UpdateUser ( int Id, int NewPid, string NewNick, string NewPassword, string NewEmail ) : void

Updates an Account's information by ID

UpdateUser ( string Nick, string Country ) : void

Updates an Accounts Country Code

UserExists ( int PID ) : bool

Returns wether an account exists from the provided Account Id

UserExists ( string Nick ) : bool

Returns wether an account exists from the provided Nick

Method Details

CreateSqlTables() public méthode

Tells the Database to install the Stats tables into the database
public CreateSqlTables ( ) : void
Résultat void

CreateUser() public méthode

Creates a new Gamespy Account
Only used in the Gamespy Account Creation Form
public CreateUser ( int Pid, string Nick, string Pass, string Email, string Country ) : bool
Pid int The Profile Id to assign this account
Nick string The Account Name
Pass string The UN-HASHED Account Password
Email string The Account Email Address
Country string The Country Code for this Account
Résultat bool

CreateUser() public méthode

Creates a new Gamespy Account
Used by the login server when a create account request is made
public CreateUser ( string Nick, string Pass, string Email, string Country ) : int
Nick string The Account Name
Pass string The UN-HASHED Account Password
Email string The Account Email Address
Country string The Country Code for this Account
Résultat int

DeleteUser() public méthode

Deletes a Gamespy Account
public DeleteUser ( int Pid ) : int
Pid int
Résultat int

DeleteUser() public méthode

Deletes a Gamespy Account
public DeleteUser ( string Nick ) : int
Nick string The Player's Nick, a.k.a Account name
Résultat int

GamespyDatabase() public méthode

Creates a new connection to the Gamespy Database
public GamespyDatabase ( ) : System
Résultat System

GetNumAccounts() public méthode

Returns the number of accounts in the database
public GetNumAccounts ( ) : int
Résultat int

GetPlayerId() public méthode

Fetches a Gamespy Account id from an account name
public GetPlayerId ( string Nick ) : int
Nick string
Résultat int

GetUser() public méthode

Fetches an account from the gamespy database
public GetUser ( int Pid ) : object>.Dictionary
Pid int The account player ID
Résultat object>.Dictionary

GetUser() public méthode

Fetches an account from the gamespy database
public GetUser ( string Nick ) : object>.Dictionary
Nick string The user's Nick
Résultat object>.Dictionary

GetUsersByEmailPass() public méthode

Fetches an account from the gamespy database
public GetUsersByEmailPass ( string Email, string Password ) : object>>.List
Email string The Account email
Password string the MD5 HASHED Account Password
Résultat object>>.List

GetUsersLike() public méthode

Returns a list of player names that are similar to the passed parameter
public GetUsersLike ( string Nick ) : List
Nick string
Résultat List

MigrateTables() public méthode

If there is any table updates that need to be applied, calling this method will apply each update until the current database version is up to date
public MigrateTables ( ) : void
Résultat void

SetPlayerId() public méthode

Sets the Account (Player) Id for an account by Name
public SetPlayerId ( string Nick, int Pid ) : int
Nick string The account Nick we are setting the new Pid for
Pid int The new Pid
Résultat int

UpdateUser() public méthode

Updates an Account's information by ID
public UpdateUser ( int Id, int NewPid, string NewNick, string NewPassword, string NewEmail ) : void
Id int The Current Account ID
NewPid int New Account ID
NewNick string New Account Name
NewPassword string New Account Password, UN HASHED. Leave empty to not set a new password
NewEmail string New Account Email Address
Résultat void

UpdateUser() public méthode

Updates an Accounts Country Code
public UpdateUser ( string Nick, string Country ) : void
Nick string
Country string
Résultat void

UserExists() public méthode

Returns wether an account exists from the provided Account Id
public UserExists ( int PID ) : bool
PID int
Résultat bool

UserExists() public méthode

Returns wether an account exists from the provided Nick
public UserExists ( string Nick ) : bool
Nick string
Résultat bool

Property Details

LatestVersion public_oe static_oe property

Indicates the most up to date database table version
public static Version,System LatestVersion
Résultat System.Version