While it looks right to me, one option that I have come across is that mIRC is (sometimes) picky regarding spaces.
Just a suggestion:
alias k {
if $$1 isnum && $$2 {
return $+($chr(3),$$1,$$2-,$chr(3))
}
}
Another possibility I just thought of, is that you might need to evaluate the expression before returning it.
If that's the case, use
return $($+($chr(3),$$1,$$2-,$chr(3)),2)
for your return line.