Perhaps you need to provide a brief instruction. Because some people who are new to MSL may not know how to use this script. Also, you can combines these two if statements:> if !%z {
if proh isin %tmp && $g(2) isin %tmp {to one line:
if !%z && proh isin %tmp && $g(2) isin %tmp {
, which will make your script one step smaller.
P.S. I think you should include a sockclose event to unset a couple of vars:
on *:SOCKCLOSE:c:unset %x %tmp