Handles the addition, lookup, and removal of IP bans.
More...
|
| static bool | Add ([NotNull] IPBanInfo ban, bool raiseEvent) |
| | Adds a new IP Ban.
|
| |
| static IPBanInfo | Get ([NotNull] IPAddress address) |
| | Retrieves ban information for a given IP address.
|
| |
| static bool | Contains ([NotNull] IPAddress address) |
| | Checks whether the given address is banned.
|
| |
| static bool | Remove ([NotNull] IPAddress address, bool raiseEvents) |
| | Removes a given IP address from the ban list (if present).
|
| |
| static void | BanIP ([NotNull] this IPAddress targetAddress,[NotNull] Player player,[CanBeNull] string reason, bool announce, bool raiseEvents) |
| | 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.
|
| |
| static void | UnbanIP ([NotNull] this IPAddress targetAddress,[NotNull] Player player,[CanBeNull] string reason, bool announce, bool raiseEvents) |
| | Unbans an IP address. If an associated PlayerInfo is known, use a different overload of this method instead. Throws PlayerOpException on problems.
|
| |
| static void | BanAll ([NotNull] this IPAddress targetAddress,[NotNull] Player player,[CanBeNull] string reason, bool announce, bool raiseEvents) |
| | Bans given IP address and all accounts on that IP. All players from IP are kicked. Throws PlayerOpException on problems.
|
| |
| static void | UnbanAll ([NotNull] this IPAddress targetAddress,[NotNull] Player player,[CanBeNull] string reason, bool announce, bool raiseEvents) |
| | Unbans given IP address and all accounts on that IP.
|
| |
|
| static bool | IsLoaded [get, set] |
| |
| static int | Count [get] |
| | Number of active IP bans on record.
|
| |
Handles the addition, lookup, and removal of IP bans.
| static bool fCraft.IPBanList.Add |
( |
[NotNull] IPBanInfo |
ban, |
|
|
bool |
raiseEvent |
|
) |
| |
|
static |
Adds a new IP Ban.
- Parameters
-
| ban | Ban information |
| raiseEvent | Whether AddingIPBan and AddedIPBan events should be raised. |
- Returns
- True if ban was added, false if it was already on the list
| static void fCraft.IPBanList.BanAll |
( |
[NotNull] this IPAddress |
targetAddress, |
|
|
[NotNull] Player |
player, |
|
|
[CanBeNull] string |
reason, |
|
|
bool |
announce, |
|
|
bool |
raiseEvents |
|
) |
| |
|
static |
Bans given IP address and all accounts on that IP. All players from IP are kicked. Throws PlayerOpException on problems.
- Parameters
-
| 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 | Whether ban should be publicly announced on the server. |
| raiseEvents | Whether AddingIPBan, AddedIPBan, BanChanging, and BanChanged events should be raised. |
- Exceptions
-
| ArgumentNullException | targetAddress or player is null. |
| PlayerOpException | Permission or configuration issues arise, or if everyone has already been banned. |
| static void fCraft.IPBanList.BanIP |
( |
[NotNull] this IPAddress |
targetAddress, |
|
|
[NotNull] Player |
player, |
|
|
[CanBeNull] string |
reason, |
|
|
bool |
announce, |
|
|
bool |
raiseEvents |
|
) |
| |
|
static |
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.
- Parameters
-
| 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 | Whether ban should be publicly announced on the server. |
| raiseEvents | Whether AddingIPBan and AddedIPBan events should be raised. |
- Exceptions
-
| ArgumentNullException | targetAddress or player is null. |
| PlayerOpException | Permission or configuration issues arise, or if IP is already banned. |
| static bool fCraft.IPBanList.Contains |
( |
[NotNull] IPAddress |
address | ) |
|
|
static |
Checks whether the given address is banned.
- Parameters
-
| address | Address to look for. |
| static IPBanInfo fCraft.IPBanList.Get |
( |
[NotNull] IPAddress |
address | ) |
|
|
static |
Retrieves ban information for a given IP address.
- Parameters
-
| address | IP address to check. |
- Returns
- IPBanInfo object if found, otherwise null.
| static bool fCraft.IPBanList.Remove |
( |
[NotNull] IPAddress |
address, |
|
|
bool |
raiseEvents |
|
) |
| |
|
static |
Removes a given IP address from the ban list (if present).
- Parameters
-
| address | Address to unban. |
| raiseEvents | Whether to raise RemovingIPBan and RemovedIPBan events. |
- Returns
- True if IP was unbanned. False if it was not banned in the first place, or if it was cancelled by an event.
| static void fCraft.IPBanList.UnbanAll |
( |
[NotNull] this IPAddress |
targetAddress, |
|
|
[NotNull] Player |
player, |
|
|
[CanBeNull] string |
reason, |
|
|
bool |
announce, |
|
|
bool |
raiseEvents |
|
) |
| |
|
static |
Unbans given IP address and all accounts on that IP.
- Parameters
-
| 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 | Whether unban should be publicly announced on the server. |
| raiseEvents | Whether RemovingIPBan, RemovedIPBan, BanChanging, and BanChanged events should be raised. |
- Exceptions
-
| ArgumentNullException | targetAddress or player is null. |
| PlayerOpException | Permission or configuration issues arise, or if everyone has already been unbanned. |
| static void fCraft.IPBanList.UnbanIP |
( |
[NotNull] this IPAddress |
targetAddress, |
|
|
[NotNull] Player |
player, |
|
|
[CanBeNull] string |
reason, |
|
|
bool |
announce, |
|
|
bool |
raiseEvents |
|
) |
| |
|
static |
Unbans an IP address. If an associated PlayerInfo is known, use a different overload of this method instead. Throws PlayerOpException on problems.
- Parameters
-
| 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 | Whether unban should be publicly announced on the server. |
| raiseEvents | Whether RemovingIPBan and RemovedIPBan events should be raised. |
- Exceptions
-
| ArgumentNullException | targetAddress or player is null. |
| PlayerOpException | Permission or configuration issues arise, or if IP is already unbanned. |
| int fCraft.IPBanList.Count |
|
staticget |
Number of active IP bans on record.
| bool fCraft.IPBanList.IsLoaded |
|
staticgetset |
Occurs when a new IP ban has been added.
Occurs when a new IP ban is about to be added (cancelable).
Occurs after an existing IP ban has been removed.
Occurs when an existing IP ban is about to be removed (cancelable).
The documentation for this class was generated from the following file: