Use *:*:raw event. Find out the numerics of WHO
because i dont remember it right now let's say it is 1
In tha case you'd have to use this scipt:
Code:
*:*:raw {
if ($numeric == 1) {
.write who.txt $1-
}
}

You might wanna double check the format of the event in the help files because i havent used it lately and i might be doing some typo
Good luck!