fix antispam when setting is empty

remove unused codes