You can use this as a starting point:
raw 311:*:echowho Beginning Of Whois List | echowho $2 is $+($3,@,$4) $5-
raw 312:*:echowho Server: $3-
raw 317:*:echowho sighed on: $asctime($4) idle: $duration($3)
raw 318:*:echowho End Of Whois List
raw 319:*:echowho Channels: $3-
raw *:*:if $istok(301 307 310 313 320 335 378 379,$numeric,32) { echowho $2- }
alias echowho haltdef | echo -aci11 whois $+([,$time,]) $1-