Added logic to detect if IP is already banned, thus preventing duplicate rules.