Fixing IP address handling in log_spam_block()