Skip to content

Ban Manager

The AdminTool's Ban Manager module gives the administrator full user banning capabilities. With respect to the similar feature available in the Ban User section of the Zone Monitor module, this dedicated module offers more fine-grained options, and it also shows the lists of the banned usernames and IP addresses.

Ban Manager screenshot

Ban modes

Users can be banned in two ways: by username and by IP address. Username banning can be achieved in the following ways.

  1. Using the AdminTool itself, as described below or in the Zone Monitor module's documentation.
  2. Inside your application, if one or more special users have SuperUser privileges (see description of the Privilege Manager tab of the Zone Configurator module for more information) and the application interface has the proper controls to do it.
  3. Automatically by SmartFoxServer, setting to NAME the Ban mode property of the Words and Flood filters in the Zone Configurator module.

IP address banning is instead performed automatically by the Words and Flood filters of SmartFoxServer, provided that their Ban mode property in the Zone Configurator module is set to IP.

Usage

Click the Ban username button to open the modal panel containing the controls to ban users by their username. As usernames are unique at Zone-level (not at server-level), the Zone in which this username should be banned must be selected in order to activate the button.

Ban username

The following details must then be provided before pressing the Ban button inside the modal.

  • Username — The name of the user to be banned; if the user is online, they will be disconnected from the server.
  • Reason(optional) A generic note that will be displayed in the banned usernames list of the module. You can enter the reason why the user was banned, or other information of your choice.
  • Message to user(optional) If the user is online when banned, this message will be delivered to them just before the disconnection occurs. The application must be capable of handling the ADMIN_MESSAGE event.
  • Delay — The number of seconds after which the user, if online, will be disconnected from the server when banned.
  • Ban expiration — The duration of the banishment; when expired, SmartFoxServer automatically removes the username from the ban list. It can be expressed as a duration (in hours and minutes) or as a future expiration date, or you can tell the server that this banishment should last forever.

When the Ban button is pressed and the user is banned, the modal panel doesn't close automatically, allowing administrators to ban other users with the same settings. Hit the Close button to reset the form to default values and close the modal.

The Banned Usernames and Banned IP Addresses tabs show the respective lists. Their usage is the same, except that the Banned Usernames tab requires a Zone to be selected.

The lists show the following details.

  • Username/IP address — The banned username/IP address.
  • Date — The date and time when the user/IP was banned.
  • Expiration — The date and time when the banishment will end.
  • Reason — The reason entered by the administrator when banning the user/IP (see above).
  • Banned By — The username of the administrator/moderator who banned the user; in case of automatic banning performed by SmartFoxServer, the word server is displayed.

List refresh

The lists are not updated automatically in case a user is banned using methods 2 and 3 above: you have to press the Refresh button below the list (left corner).

One or more banned usernames/IP addresses can be removed at once by selecting them and pressing the Remove selected button. In order to select multiple list items, keep the CTRL (Windows/Linux) or CMD (macOS) key pressed while clicking on the list. To empty the list, click the Remove all button.