I know you wanted to do it, but you forgot a part
while (%x <= %lines
and while we're at it, why not
if (loggedin* !iswm $read(qlist.hsh,%x)) echo -a $v2
If it's a very large hash file, you'll want to look at /fopen and such, but it's probably not worth the effort in this case...