For those that may be looking for an example of socket code, here is an updated version to the original, sort of working around the issue of accepting connections to get the $sock().ip Also mildly cleaner
on *:socklisten:connect:{
sockaccept verify
echo -a Socket Accepted
if (!$read(sockets.txt,w,$gettok($sock(verify).ip,1-3,46))) {
sockclose verify
Echo -a User is not in Access list
}
else {
Echo -a User Accepted
sockwrite $sockname You are Accepted
sockrename verify conn_ $+ $rand(1,9999)
}
}