void irc_OnChannelMessage(object sender, IrcEventArgs e) { MessageBox.Show(Convert.ToString(timeStart) + " - " + Convert.ToString(timeStop)); OutputLine("<"); OutputLine(e.Data.Nick); OutputLine("> "); OutputLine(e.Data.Message); OutputLine(Environment.NewLine); if (mathGame == true) { if (e.Data.Message.Contains(sum.ToString())) { t.Stop(); irc.SendMessage(SendType.Message, e.Data.Channel, e.Data.Nick + " is the winner!"); OutputLine("<" + botnick + "> Congrats " + e.Data.Nick + "! You are the winner!\r\n"); mathGame = false; } } } void t_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { t.Stop(); irc.SendMessage(SendType.Message, e.Data.Channel, "Nobody answered in within 10 seconds! You all need to sharpen your math skills..."); }