C# 클래스 fCraft.IPBanList

파일 보기 프로젝트 열기: GlennMR/800craft 1 사용 예제들

공개 메소드들

메소드 설명
Add ( [ ban, bool raiseEvent ) : bool

Adds a new IP Ban.

BanAll ( [ targetAddress, [ player, [ reason, bool announce, bool raiseEvents ) : void

Bans given IP address and all accounts on that IP. All players from IP are kicked. Throws PlayerOpException on problems.

BanIP ( [ targetAddress, [ player, [ reason, bool announce, bool raiseEvents ) : void

Bans given IP address. All players from IP are kicked. If an associated PlayerInfo is known, use a different overload of this method instead. Throws PlayerOpException on problems.

Contains ( [ address ) : bool

Checks whether the given address is banned.

Remove ( [ address, bool raiseEvents ) : bool

Removes a given IP address from the ban list (if present).

UnbanAll ( [ targetAddress, [ player, [ reason, bool announce, bool raiseEvents ) : void

Unbans given IP address and all accounts on that IP. Throws PlayerOpException on problems.

UnbanIP ( [ targetAddress, [ player, [ reason, bool announce, bool raiseEvents ) : void

Unbans an IP address. If an associated PlayerInfo is known, use a different overload of this method instead. Throws PlayerOpException on problems.

비공개 메소드들

메소드 설명
Get ( [ address ) : IPBanInfo
Load ( ) : void
ParseHeader ( [ header ) : int
RaiseAddedIPBanEvent ( [ info ) : void
RaiseAddingIPBanEvent ( [ info ) : bool
RaiseRemovedIPBanEvent ( [ info ) : void
RaiseRemovingIPBanEvent ( [ info ) : bool
Save ( ) : void

메소드 상세

Add() 공개 정적인 메소드

Adds a new IP Ban.
public static Add ( [ ban, bool raiseEvent ) : bool
ban [ Ban information
raiseEvent bool Whether AddingIPBan and AddedIPBan events should be raised.
리턴 bool

BanAll() 공개 정적인 메소드

Bans given IP address and all accounts on that IP. All players from IP are kicked. Throws PlayerOpException on problems.
public static BanAll ( [ targetAddress, [ player, [ reason, bool announce, bool raiseEvents ) : void
targetAddress [ IP address that is being banned.
player [ Player who is banning.
reason [ Reason for ban. May be empty, if permitted by server configuration.
announce bool Whether ban should be publicly announced on the server.
raiseEvents bool Whether AddingIPBan, AddedIPBan, BanChanging, and BanChanged events should be raised.
리턴 void

BanIP() 공개 정적인 메소드

Bans given IP address. All players from IP are kicked. If an associated PlayerInfo is known, use a different overload of this method instead. Throws PlayerOpException on problems.
public static BanIP ( [ targetAddress, [ player, [ reason, bool announce, bool raiseEvents ) : void
targetAddress [ IP address that is being banned.
player [ Player who is banning.
reason [ Reason for ban. May be empty, if permitted by server configuration.
announce bool Whether ban should be publicly announced on the server.
raiseEvents bool Whether AddingIPBan and AddedIPBan events should be raised.
리턴 void

Contains() 공개 정적인 메소드

Checks whether the given address is banned.
public static Contains ( [ address ) : bool
address [ Address to look for.
리턴 bool

Remove() 공개 정적인 메소드

Removes a given IP address from the ban list (if present).
public static Remove ( [ address, bool raiseEvents ) : bool
address [ Address to unban.
raiseEvents bool Whether to raise RemovingIPBan and RemovedIPBan events.
리턴 bool

UnbanAll() 공개 정적인 메소드

Unbans given IP address and all accounts on that IP. Throws PlayerOpException on problems.
public static UnbanAll ( [ targetAddress, [ player, [ reason, bool announce, bool raiseEvents ) : void
targetAddress [ IP address that is being unbanned.
player [ Player who is unbanning.
reason [ Reason for unban. May be null or empty, if permitted by server configuration.
announce bool Whether unban should be publicly announced on the server.
raiseEvents bool Whether RemovingIPBan, RemovedIPBan, BanChanging, and BanChanged events should be raised.
리턴 void

UnbanIP() 공개 정적인 메소드

Unbans an IP address. If an associated PlayerInfo is known, use a different overload of this method instead. Throws PlayerOpException on problems.
public static UnbanIP ( [ targetAddress, [ player, [ reason, bool announce, bool raiseEvents ) : void
targetAddress [ IP address that is being unbanned.
player [ Player who is unbanning.
reason [ Reason for unban. May be empty, if permitted by server configuration.
announce bool Whether unban should be publicly announced on the server.
raiseEvents bool Whether RemovingIPBan and RemovedIPBan events should be raised.
리턴 void