If you ban a user, and that particular user either logs out, navigates to another page in between the time allocated for the message to display and the actual ban to take place, the user can escape without ban.
For example:
_server.banUser(usertoban, 5, "You are banned", _server.BAN_BY_NAME);
When the server initially executes the command, the ban message is sent. However, if the user logs out before the 5 seconds are over, there is an error on the server side:
Code: Select all
INFO | jvm 1 | 2011/04/12 00:25:05 | Error: java.lang.NullPointerException
INFO | jvm 1 | 2011/04/12 00:25:05 | Handler: it.gotoandplay.smartfoxserver.tasks.BanUserTaskHandler@36858c07
INFO | jvm 1 | 2011/04/12 00:25:05 | java.lang.NullPointerException
INFO | jvm 1 | 2011/04/12 00:25:05 | at it.gotoandplay.smartfoxserver.tasks.BanUserTaskHandler.doTask(BanUserTaskHandler.java:24)
INFO | jvm 1 | 2011/04/12 00:25:05 | at it.gotoandplay.smartfoxserver.util.scheduling.Scheduler.executeTasks(Scheduler.java:314)
INFO | jvm 1 | 2011/04/12 00:25:05 | at it.gotoandplay.smartfoxserver.util.scheduling.Scheduler.run(Scheduler.java:223)
INFO | jvm 1 | 2011/04/12 00:25:05 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
INFO | jvm 1 | 2011/04/12 00:25:05 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
INFO | jvm 1 | 2011/04/12 00:25:05 | at java.lang.Thread.run(Thread.java:619)