Add in additional lines like
elseif ($numeric == 317) {
.echo -t @auto-whois $$2 has been idle for $duration($3)
}
for the additional raws that you want to show.
The raws for the /whois command (and several other commands) can be gotten from here