recently we implemented a ban request for our mods and we used the following line to do the ban:
Code: Select all
extension.getApi().banUser(...);
However, this method doesn't pass a paramter for ban reason, which will result in no reason recorded for the user if he tried to login again
only ban message paramter is available
internally it's calling the BannedUserManager and passing the reason as an empty string, if we want to use the reason param we have to use the ban manager directly, which goes something like this:
Code: Select all
IBannedUserManager manager = SmartFoxServer.getInstance().getBannedUserManager();
manager.banUser(...);
I find it a very bad practice in general to get the instance this way, but coding practices aside, is there any reason why the ban reason isn't passed in the Api call ?