예제 #1
0
 public AbstractPoll(TasClient tas, Spring spring, AutoHost ah)
 {
     this.tas    = tas;
     this.spring = spring;
     this.ah     = ah;
     string[] usrs;
     int[]    indexes;
     AutoHost.FilterUsers(new string[0], tas, spring, out usrs, out indexes);
     foreach (string s in usrs)
     {
         if (s != tas.UserName)
         {
             users.Add(s);
             votes.Add(0);
         }
     }
     initialUserCount = users.Count;
 }
예제 #2
0
        public bool Init(TasSayEventArgs e, string[] words)
        {
            if (words.Length == 0)
            {
                AutoHost.Respond(tas, spring, e, "You must specify player name");
                return(false);
            }

            string[] players;
            int[]    indexes;
            if (AutoHost.FilterUsers(words, tas, spring, out players, out indexes) > 0)
            {
                player = players[0];
                ah.SayBattle("Do you want to kick " + player + "? !vote 1 = yes, !vote 2 = no");
                return(true);
            }
            else
            {
                AutoHost.Respond(tas, spring, e, "Cannot find such player");
                return(false);
            }
        }