Inheritance: IRC.IRCConnection, IIRCBot
Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Config.Instance.Initialize(ConfigFile);

            string host = Config.Instance["host"];
            ushort port = Convert.ToUInt16(Config.Instance["port"]);
            string nick = Config.Instance["nick"];

            using (IRCBot bot = new IRCBot(host, port, nick))
            {
                bot.Join(Config.Instance["channel"]);

                Console.WriteLine("Press q to quit...");
                while (Console.ReadKey(true).KeyChar != 'q')
                    ;
            }
        }
Exemplo n.º 2
0
        //SkpValidation is "Already Checked" state, for example, ScreenController already checkes if validate.
        internal static void Load(Setting setting, bool SkipValidation = true)
        {
            if (!SkipValidation)
            {
                IEnumerable <Setting.ValueCheck> CheckResult = setting.CheckValid();
                if (CheckResult.Count() != 0)
                {
                    Console.WriteLine($"!! Invalid value(s) found in your config file : {String.Join(", ", CheckResult)}. Please check your {ConfigPath} file.");
                    Console.WriteLine("Failed to start.");
                }
            }
            Modules = ModuleLoader.Call("Modules");//Module Directory
            Modules.LoadAll();

            IRCBot Bot = new IRCBot(setting);

            Bot.Start();
        }
Exemplo n.º 3
0
        private void button4_Click(object sender, EventArgs e)
        {
            IRCBot b = new IRCBot();

            b.onServiceStart();
        }
Exemplo n.º 4
0
 private static void Main(string[] args)
 {
     IRCConfig conf = new IRCConfig();
     conf.name = "DrPepper";
     conf.nick = "DrPepper";
     conf.port = 6667;
     conf.channel = "#downfall";
     conf.server = "irc.quakenet.org";
     using (var bot = new IRCBot(conf))
     {
         conf.joined = false;
         bot.Connect();
         bot.IRCWork();
     }
     Console.WriteLine("Bot quit/crashed");
     Console.ReadLine();
 }
Exemplo n.º 5
0
 // public static Alias alias;
 // Create the Bot
 public static void Main(string[] args)
 {
     Instance = new IRCBot();
     while (true)
     {
         string input = Console.ReadLine();
         if (input == "stop")
             Environment.Exit(0);
         else
         {
             string[] arr = input.Remove(0, 1).Split(':');
             BaseUtils.SendMessage(arr[1], new[] { arr[0] });
         }
     }
 }