Generally, you would have to use another parameter to know which info you're requesting, but here, you know that if the params has a '@', it's an address, if there is a '.', it's an ip, else, its a nickname :
alias getinfo {
noop $read(userinfo.txt,w,$+(*,$$1*))
noop $regex($read(userinfo.txt,$$readn),/(.+) (.+) (.+)/)
if (. isin $1) return nick : $regml(1) address : $regml(2)
elseif (@ isin $1) return nick : $regml(1) Ip : $regml(3)
else return address : $regml(2) Ip : $regml(3)
}
I've not tested, but it should work