public override async void Process(KgsConnection connection) { Debug.WriteLine("Success. Now getting info."); var roomsArray = new int[this.Rooms.Length]; for (int i = 0; i < this.Rooms.Length; i++) { roomsArray[i] = this.Rooms[i].ChannelId; } connection.Events.RaisePersonalInformationUpdate(this.You); connection.Events.RaiseSystemMessage("Requesting room names..."); connection.Events.RaiseLoginPhaseChanged(KgsLoginPhase.RequestingRoomNames); await connection.MakeUnattendedRequestAsync("ROOM_NAMES_REQUEST", new { Rooms = roomsArray }); connection.Events.RaiseSystemMessage("Joining global lists..."); connection.Events.RaiseLoginPhaseChanged(KgsLoginPhase.JoiningGlobalLists); await connection.Commands.GlobalListJoinRequestAsync("CHALLENGES"); await connection.Commands.GlobalListJoinRequestAsync("ACTIVES"); await connection.Commands.GlobalListJoinRequestAsync("FANS"); connection.Events.RaiseSystemMessage("On-login outgoing message burst complete."); connection.LoggedIn = true; connection.LoggingIn = false; connection.Events.RaiseLoginPhaseChanged(KgsLoginPhase.Done); connection.Events.RaiseLoginComplete(LoginResult.Success); }