예제 #1
0
        /// <summary>
        /// Is called when the chaos mod starts a new vote
        /// </summary>
        /// <param name="message">Message from the pipe to be parsed into votes</param>
        private void StartNewVote(string message)
        {
            // Get vote option names (they are separated by ':')
            var optionNames = message.Split(':').ToList();

            // Remove the first option (which is basically the indicator
            // that this is a new vote)
            optionNames.RemoveAt(0);
            // Dispatch information to listeners
            OnNewVote.Invoke(this, new OnNewVoteArgs(optionNames.ToArray()));
        }
 public void NewVote() => OnNewVote?.Invoke();