You forgot to explain what your script should do, but I think I already guessed about it.
If I made a mistake in my conclusions about the task of the script, then please describe the necessary in more detail.
Sorry, I forgot the explain that I ended up creating that script to temporary z:line for a month all connections to the server except those that were excepted such as norenxaq, ErikMouse, EricMouse, and MFServ.