Ejemplo n.º 1
0
        protected virtual void HandleChg(NotificationConnection c, Command cmd)
        {
            Status newStatus = Enumerations.GetStatus(cmd.Params[0]);

            Command response = new Command(Verb.Chg, cmd.TrId, cmd.Params[0]);

            Server.Send(c, response);

            Server.UserStatusChanged(c.User, newStatus);

            // .SentInitialChg is a protocol dialect-dependent property, it shouldn't be a member of NotificationConnection
            // there should be a ProtocolState member instead, which contains this stuff

            if (!c.SentInitialChg)
            {
                // after the initial CHG from the client, give it the ILNs of its Forward List

                foreach (User forwardUser in c.User.Properties.VirtualAllowedForwardList)
                {
                    if (forwardUser.Status != Status.Fln && forwardUser.Status != Status.Hdn)
                    {
                        SendIln(c, cmd.TrId, forwardUser);
                    }
                }

                c.SentInitialChg = true;
            }
        }