本文整理汇总了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");
//.........这里部分代码省略.........