Exemple #1
0
        public override void Process(AbstractEAServer context, EAClient client)
        {
            var mc = context as MatchmakerServer;

            if (mc == null || !client.HasAuth())
            {
                return;
            }
            var user = client.User;
            var mesg = new PlusMesg()
            {
                N = user.PersonaName,
                T = TEXT,
            };

            //where is this message going
            var room = user.CurrentRoom;

            if (PRIV != null)
            {
                if (ATTR != null && ATTR.Length > 1 && ATTR[0] == 'N')
                {
                    mesg.F = "EP" + ATTR.Substring(1);
                }
                mc.SendToPersona(PRIV, mesg);
            }
            else if (room != null)
            {
                room.Users.Broadcast(mesg);
            }
        }
Exemple #2
0
        public override void Process(AbstractEAServer context, EAClient client)
        {
            var mc = context as MatchmakerServer;

            if (mc == null || !client.HasAuth())
            {
                return;
            }

            var index = mc.Database.DeletePersona(client.User.ID, PERS);

            if (index == -1)
            {
                return;
            }
            var user = client.User;

            for (int i = index; i < 4; i++)
            {
                user.Personas[index] = (i == 4) ? null : user.Personas[index + 1];
            }

            client.SendMessage(new DperOut()
            {
                NAME = user.Username,
                PERS = PERS
            });
        }
Exemple #3
0
        public override void Process(AbstractEAServer context, EAClient client)
        {
            var mc = context as MatchmakerServer;

            if (mc == null || !client.HasAuth())
            {
                return;
            }

            var index = mc.Database.AddPersona(client.User.ID, PERS);

            if (index < 0)
            {
                if (index == -2)
                {
                    client.SendMessage(new CperDupl());
                }
                else
                {
                    client.SendMessage(new CperImst());
                }
                return;
            }
            var user = client.User;

            user.Personas[index] = PERS;

            client.SendMessage(new CperOut()
            {
                NAME = user.Username,
                PERS = PERS
            });
        }