public static void _Join(IRCClient sender, Client clt, Channel chan) { if (clt.Nick == sender.Nick) { sender.SendMessage(chan, "Hey! I just joined " + chan); } else { sender.SendMessage(chan, "Hey " + clt + "! Welcome in " + chan + " :)"); } }
public static void _Part(IRCClient sender, Client clt, Channel chan) { if (clt.Nick != sender.Nick) { sender.SendMessage(chan, "Bye, bye {0}", clt); } }
public static void _Msg(IRCClient sender, Client clt, object target, string msg) { if (msg.ToLower().StartsWith(sender.Nick.ToLower() + " ")) { string m = msg.Remove(0, sender.Nick.Length + 1).ToLower(); string[] split = m.Split(new char[] { ' ' }, 2); switch (split[0]) { case "quit": if (clt.Nick != "Metty") { sender.SendKick(target as Channel, clt, "F**k off!"); return; } sender.SendMessage(target, "Yes, SIR!"); sender.Disconnect("Executing order 666 from " + clt); break; case "join": if (split.Length < 2) { return; } sender.SendMessage(target, "I'll do so!"); sender.SendJoin(split[1]); break; case "part": if (split.Length < 2) { return; } sender.SendMessage(target, ":/ .... okay " + clt); sender.SendMessage(split[1], ":(...goodbye!"); sender.SendPart(split[1]); break; default: sender.SendMessage(target, "Mhmhmh " + clt + "?"); break; } } else if (msg.ToLower() == sender.Nick.ToLower()) { sender.SendMessage(target, "Yep " + clt + "?"); } }
public static void _Mode(IRCClient sender, Client clt, object loc, string mode) { sender.SendMessage(loc, B(clt + " set mode: " + mode)); }