예제 #1
0
        private void OnUserJoined(TUserJoined user)
        {
            List <TUserSaludo> listasaludos = obternetSaludos();
            var userSaludo = listasaludos.Find(x => x.Name == user.Name && x.Channel == Channel);

            if (userSaludo != null)
            {
                sendMessage(userSaludo.Saludo);
            }
            else
            {
                switch (user.Nivel)
                {
                case UserType.Viewer:
                    onUserJoined(user);
                    break;

                case UserType.Moderator:
                    onModJoined(user);
                    break;

                default:
                    break;
                }
            }
        }
예제 #2
0
        private TUser verifiUserJoined(OnMessageReceivedArgs e)
        {
            TUserJoined user = new TUserJoined()
            {
                Name = e.ChatMessage.Username, isJoined = true, Nivel = e.ChatMessage.UserType, Channel = Channel
            };
            var foundit = listaUsuariosxStream.Find(x => x.Name.Equals(user.Name, StringComparison.CurrentCultureIgnoreCase) && user.Channel == Channel);

            if (foundit == null)
            {
                listaUsuariosxStream.Add(user);
                OnUserJoined(user);
            }
            return(user);
        }
예제 #3
0
 private void onUserJoined(TUserJoined user)
 {
     sendMessage("Bienvenido @" + user.Name + " disfruta del stream en compañia de todos BloodTrail");
 }
예제 #4
0
 private void onModJoined(TUserJoined user)
 {
     //sendMessage("cuidado todos, acaba de llegar la espada de @" + user.Name + ", pero olvido afilarla Kappa");
 }