public async void SessionUpgraded(IAriesSession oldSession, IAriesSession newSession) { if (!(newSession is IVoltronSession)) { return; } //Aries session has upgraded to a voltron session IVoltronSession voltronSession = (IVoltronSession)newSession; //TODO: Make sure this user is not already connected, if they are disconnect them newSession.Write(new HostOnlinePDU { ClientBufSize = 4096, HostVersion = 0x7FFF, HostReservedWords = 0 }); //CAS, don't hydrate the user if (voltronSession.IsAnonymous) { return; } //New avatar, enroll in voltron group var avatar = await DataService.Get <Avatar>(voltronSession.AvatarId); //can throw? //Mark as online avatar.Avatar_IsOnline = true; VoltronSessions.Enroll(newSession); Events.UserJoined(voltronSession); Neigh.UserJoined(voltronSession); TuningDomain.UserJoined(voltronSession); //TODO: Somehow alert people this sim is online? }