SFS2X Docs / GettingStarted / admintool-BanManager
» Ban Manager module
The AdminTool's Ban Manager module gives the administrator full user banning capabilities. With respect to the similar feature available in the User Monitoring view 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.
Users can be banned in two ways: by username and by IP address. Username banning can be achieved in the following ways:
- using the AdminTool itself, as described in the following paragraph or in the Zone Monitor module's documentation;
- within your application if one or more special users have SuperUser privileges (see the Zone Configurator module's Privilege Manager tab description for more information) and the application interface has the proper controls to do it;
- automatically by SmartFoxServer 2X, setting to NAME the Ban mode property of the words and flood filters in the Zone Configurator module.
IP address banning is performed automatically by the words and flood filters of SFS2X setting to IP their Ban mode property in the Zone Configurator module.
» Usage
Click the Ban a user button to open a modal panel providing 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.
The following details must then be provided before pressing the Ban button in the modal.
- Username: the name of the user to be banned; if the user is online, he/she will be disconnected from the server.
- Reason: (optional) a generic note that will be displayed in the banned usernames and IP addresses lists in the main section 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 him/her 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, SFS2X 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 is not automatically closed, allowing administrators to ban other users keeping the same settings. Press 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 2X, the word server is displayed.
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 (Mac OS X) key pressed while clicking on the list.
To empty the list, click on the Remove all button.