just an alteration from this snippet dated april 28th 2009
http://www.hawkee.com/snippet/6068/
menu menubar {
Protections
.Server LockDown
.. -
.. $iif($group(#lock) == on,$style(1) Enabled,Enabled): enable #lock | set %lock on | msg $chan 4Server Locked Down now started.
.. $iif($group(#lock) == off,$style(1) Disabled,Disabled): disable #lock | set %lock off | msg $chan 4Server Lockdown now terminated.
}
#lock off
on *:snotice:*Client connecting*:{
if (%lock == on) {
var %tempfilea $read(server.txt,w,$gettok($remove($9,$chr(40)),1,64))
if ($gettok(%tempfilea,0,32) != $null) { globops $9 a 4Safelist User has Connected }
else { kill $9 4Server Is Locked Down
unset %tempfilea
}
}
}
#lock end