rendered paste bodyvoid 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();
string message = "Sorry, " + e.Data.Nick + ", that is incorrect. Learn your math!";
}