IP exclusion in script

Thanks for that. Much appreciated.