Fixed possibly crashes.

Fixed possibly crash during checking player how many times has been
banned before, modified function that checks is player flagged and fixed
possibly crash during ban when motd was set on the web.