当前位置: 首页>>代码示例>>C#>>正文


C# Loader.createAD方法代码示例

本文整理汇总了C#中Loader.createAD方法的典型用法代码示例。如果您正苦于以下问题:C# Loader.createAD方法的具体用法?C# Loader.createAD怎么用?C# Loader.createAD使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Loader的用法示例。


在下文中一共展示了Loader.createAD方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: mainLoop

    public string mainLoop(int startTime)
    {
        Information information = new Information();
         ChannelActions ChanActs = new ChannelActions();
         ChanModes mode = new ChanModes();
         Loader load = new Loader();
         CTCP ctcp = new CTCP();
         UserControl users = new UserControl();
         httpRegex = new Regex(@"(?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:\.(?:\d+)){3}))(?::(?:\d+))?)(?:/(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[;:@&=])*)(?:/(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[;:@&=])*))*)(?:\?(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[;:@&=])*))?)?)|(?:ftp://(?:(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[;?&=])*)(?::(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[;?&=])*))[email protected])?(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:\.(?:\d+)){3}))(?::(?:\d+))?))(?:/(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[?:@&=])*)(?:/(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[?:@&=])*))*)))");
         try
         {

         ThreadStart userThreadStart = new ThreadStart(users.userControl);
         Thread userThread = new Thread(userThreadStart);
         userThread.Start();
         }
         catch (Exception e)
         {
         Console.WriteLine(e.ToString());
         }

         while (true)
         {
         while ((inputLine = reader.ReadLine()) != null)
         {
             Console.WriteLine(inputLine);

             if (inputLine.IndexOf("376") >= 0) //End of MOTD
             {
                 writer.WriteLine("JOIN " + channel);
                 writer.Flush();

          }
             else
                 break;

             while ((inputLine = reader.ReadLine()) != null)
             {
                 Console.WriteLine(inputLine);

                 if (ctcp.isCTCP())
                     ctcp.processCTCPType();

                 else if (inputLine == ("PING :" + server))
                 {
                     writer.WriteLine("PONG " + server);
                     writer.Flush();
                 }

                 else if (inputLine.ToLower().IndexOf(nick.ToLower() + ": op me") >= 0 && information.sender() == owner)
                 {
                     mode.setMode("+o", owner);
                 }

                 else if (inputLine.ToLower().IndexOf(nick.ToLower() + ": op") >= 0)
                 {
                     string realSender = information.sender();
                     string realMsg = information.msg();
                     information.sendNamesToSrv();
                     inputLine = reader.ReadLine();
                     if (information.isOped(realSender) || information.sender() == owner && information.senderHost() == ownerhost)
                         mode.setMode("+o", realMsg.Substring(nick.Length + 5));

                 }

                 else if (inputLine.ToLower().IndexOf(nick.ToLower() + ": voice me") >= 0 || inputLine.ToLower().IndexOf(nick.ToLower() + ": voice ") >= 0)
                 {
                     mode.setMode("+v", information.sender());
                 }

                 else if (inputLine.ToLower().IndexOf(nick.ToLower() + ": uptime") >= 0)
                 {
                     Uptime uptime = new Uptime();
                     uptime.uptime(startTime);

                 }

                 else if (inputLine.IndexOf("PART " + channel) >= 0)
                 {
                     users.userPart();

                 }

                 else if (inputLine.ToLower().IndexOf(nick.ToLower() + ": die") >= 0 && information.sender() == owner)
                 {
                     writer.WriteLine("QUIT :My master killed me");
                     writer.Flush();
                     cleanup();

                     return "ok";
                 }
                 else if (inputLine.ToLower().IndexOf(nick.ToLower() + ": topic") >=0  && information.sender() == owner)
                 {
                     mode.setTopic();
                 }
                 else if (inputLine.ToLower().IndexOf(nick.ToLower() + ": !load") >= 0 && information.sender() == owner)
                 {

                     load.createAD("load");

//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:sharp-bot-svn,代码行数:101,代码来源:ircLib.cs


注:本文中的Loader.createAD方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。