C# 클래스 TShockAPI.DB.BanManager

Class that manages bans.
파일 보기 프로젝트 열기: NyxStudios/TShock

공개 메소드들

메소드 설명
AddBan ( string ip, string name = "", string uuid = "", string reason = "", bool exceptions = false, string banner = "", string expiration = "" ) : bool

Adds a ban.

BanManager ( IDbConnection db ) : System

Initializes a new instance of the TShockAPI.DB.BanManager class.

ClearBans ( ) : bool

Clears bans.

GetBanByIp ( string ip ) : Ban

Gets a ban by IP.

GetBanByName ( string name, bool casesensitive = true ) : Ban

Gets a ban by name.

GetBanByUUID ( string uuid ) : Ban

Gets a ban by UUID.

GetBans ( ) : List

Gets a list of bans.

RemoveBan ( string match, bool byName = false, bool casesensitive = true, bool exceptions = false ) : bool

Removes a ban.

메소드 상세

AddBan() 공개 메소드

Adds a ban.
public AddBan ( string ip, string name = "", string uuid = "", string reason = "", bool exceptions = false, string banner = "", string expiration = "" ) : bool
ip string Ip.
name string Name.
uuid string UUID.
reason string Reason.
exceptions bool If set to true enable throwing exceptions.
banner string Banner.
expiration string Expiration date.
리턴 bool

BanManager() 공개 메소드

Initializes a new instance of the TShockAPI.DB.BanManager class.
public BanManager ( IDbConnection db ) : System
db IDbConnection A valid connection to the TShock database
리턴 System

ClearBans() 공개 메소드

Clears bans.
public ClearBans ( ) : bool
리턴 bool

GetBanByIp() 공개 메소드

Gets a ban by IP.
public GetBanByIp ( string ip ) : Ban
ip string The IP.
리턴 Ban

GetBanByName() 공개 메소드

Gets a ban by name.
public GetBanByName ( string name, bool casesensitive = true ) : Ban
name string The name.
casesensitive bool Whether to check with case sensitivity.
리턴 Ban

GetBanByUUID() 공개 메소드

Gets a ban by UUID.
public GetBanByUUID ( string uuid ) : Ban
uuid string The UUID.
리턴 Ban

GetBans() 공개 메소드

Gets a list of bans.
public GetBans ( ) : List
리턴 List

RemoveBan() 공개 메소드

Removes a ban.
public RemoveBan ( string match, bool byName = false, bool casesensitive = true, bool exceptions = false ) : bool
match string Match.
byName bool If set to true by name.
casesensitive bool If set to true casesensitive.
exceptions bool If set to true exceptions.
리턴 bool