private void UpdateBuddyLists(object sender, MemberLogonEventArgs args) { var message = _netServer.CreateMessage(); message.Write(DataMessageType.MemberJoined.ToString()); message.Write(args.LoggedOnMember.Name); // TODO: have yourself in the list or not? //var recipients = _members.Where(m => m != args.LoggedOnMember).Select(m => m.Connection).ToList(); var recipients = _members.Select(m => m.Connection).ToList(); if (recipients.Count > 0) _netServer.SendMessage(message, recipients, NetDeliveryMethod.ReliableUnordered, 0); }
private void OnMemberLogon(MemberLogonEventArgs args) { MemberLogonHandler handler = MemberLogon; if (handler != null) handler(this, args); }