it returns $null because mirc doesn't know what the server is, but because you make it echo "a <server>" it will still output a, but not $null, so what you are seeing isn't a bug.