コード例 #1
0
ファイル: Parser.cs プロジェクト: tabaha/Deishuu-Client
        public Parser(IrcClient client) {
            Client = client;

            NickMatcher = new Regex("[^:! ]+");

            ServerReplies = new Hashtable();
            LoadServerReplies();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: tabaha/Deishuu-Client
        static void Main(string[] args) {

            //Settings hue = new Settings("irc.rizon.net", 6667, @"Gaenbot", "gaenbot", "gaenbot", null, "Gaen", new List<string>() { "#Gaen" });

            /*using (var fw = new StreamWriter("config.json", false)) {
                String json = JsonConvert.SerializeObject(hue);
                fw.WriteLine(json);
            }*/
            Settings hue;
            using(var fr = new StreamReader("config.json")) {
                String result = fr.ReadToEnd();
                hue = JsonConvert.DeserializeObject<Settings>(result);
            }

            


            IRC.IrcClient huec = new IRC.IrcClient(hue);
            huec.Connect();

            /*String origin = GetXMLStringFromUrl(@"http://kaylith.co.uk/feed/");

            var xml = XDocument.Parse(origin);*/
            //Console.WriteLine(xml.Root.ToString());
            /*var query = from c in xml.Root.Descendants("item")
                        where true
                        select c;*/


            /*var kek = xml.Root.Descendants("item");
            foreach (var wtv in xml.Root.Descendants("item")) {

                Console.WriteLine(wtv.Element("title").Value + "\n" + wtv.Element("link").Value + "\n" + wtv.Element("pubDate").Value + "\n");
            }*/

            /*var wp = new DataSources.Wordpress.WordpressPostRSS(@"http://kaylith.co.uk/feed/", null);
            foreach (var i in wp.Update()) {
                Console.WriteLine(i.Creator + "-\n" + i.Title + "\n" + i.Description + "-----\n");
            }*/

            Console.ReadLine();

        }