Heh, I played with this when I was working in the Second Life/Virtual world bubble (around 2008). Back then it was called OpenSim and the code was a mess, not made any better by running in an itself very buggy (at least then) Mono runtime. Enthusiastic hackers working on it though!
Back then the client (viewer) was still closed source, which seems to have changed since.