on *:text:!whois *:#:{
if (($2) && (!$3)) {
enable #returnwhois
set %channel $chan
whois $2
}
}
#returnwhois off
raw 311:*: msg %channel $2-
raw 378:*: msg %channel $2-
raw 307:*: msg %channel $2-
raw 319:*: msg %channel $2-
raw 313:*: msg %channel $2-
raw 317:*: msg %channel $2-
raw 318:*: disable #returnwhois | unset %channel
#returnwhois end

Whois replies are based on unrealircd 3.2-beta15.

Just a note to those wondering why i don't use the [ $+ code $+ ] codes on the forum, its cuz it severly screws up the new lines so i perfer not to use it.