Beispiel #1
0
        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 + "?");
            }
        }
Beispiel #2
0
 public static void _Con(IRCClient sender)
 {
     sender.SendJoin("#uthgard");
 }