void Bot_OnJoin(Network n, Irc.JoinEventArgs e) { List <EventInfo> eventInfos = LoadFromFile <List <EventInfo> >("Events"); DeleteOldEvents(eventInfos); int i = eventInfos.Count; if (i == 1) { n.SendMessage(Abbot.Irc.SendType.Notice, e.Who, "There is 1 upcoming event."); } else { n.SendMessage(Abbot.Irc.SendType.Notice, e.Who, "There are " + i + " upcoming events."); } }
void Check(Network network, Irc.JoinEventArgs e) { List <TellInfo> l = LoadFromFile <List <TellInfo> >("Tell"); List <TellInfo> tmp = new List <TellInfo>(); foreach (TellInfo t in l) { if (t.Target == e.Data.Nick && t.Network == network.Name) { tmp.Add(t); Answer(network, e, FormatBold(e.Data.Nick) + ", on " + FormatBold(t.Date.ToLongDateString()) + " " + FormatBold(t.Date.ToLongTimeString()) + " " + FormatBold(t.Name) + " wanted to tell you " + FormatBold(t.Text) + "."); } } foreach (TellInfo t in tmp) { l.Remove(t); } if (tmp.Count > 0) { SaveToFile <List <TellInfo> >(l, "Tell"); } }
void Bot_OnJoin(Network network, Irc.JoinEventArgs e) { Check(network, e); }
void Bot_OnJoin(Network network, Irc.JoinEventArgs e) { NewSeen(network.Name, e.Data.Nick, e.Data.Ident, "joining " + e.Data.Channel); }
void Bot_OnJoin(Network n, Irc.JoinEventArgs e) { Op(n, e.Data.From, e.Data.Nick, e.Data.Channel); }