you could do something like
alias isconnected {
.enable #iscon
whois $1
}
#iscon off
raw *:*: {
if ($regex($numeric,/3(07|19|12|13|10|20|17))) halt
elseif ($numeric == 311) { echo -a $1 is connected! | halt }
elseif ($numeric == 401) { echo -a $2 isn't connected! | halt }
elseif ($numeric == 318) .disable #iscon | halt
}
#iscon end