本文整理匯總了C#中wmib.Channel.ContainsUser方法的典型用法代碼示例。如果您正苦於以下問題:C# Channel.ContainsUser方法的具體用法?C# Channel.ContainsUser怎麽用?C# Channel.ContainsUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類wmib.Channel
的用法示例。
在下文中一共展示了Channel.ContainsUser方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RetrieveStatus2
public void RetrieveStatus2(string nick, Channel channel, string source)
{
try
{
string response = "I have never seen " + nick;
bool found = false;
string action = "quiting the network";
lock (GlobalList)
{
foreach (item xx in GlobalList)
{
if (nick.ToUpper() == xx.nick.ToUpper())
{
found = true;
Channel last;
switch (xx.LastAc)
{
case item.Action.Join:
action = "joining the channel";
last = Core.GetChannel(xx.lastplace);
if (last != null)
{
if (last.ContainsUser(nick))
{
action += ", they are still in the channel";
}
else
{
action += ", but they are not in the channel now and I don't know why, in";
}
}
break;
case item.Action.Kick:
action = "kicked from the channel";
break;
case item.Action.Nick:
if (xx.newnick == null)
{
action = "error NULL pointer at record";
break;
}
action = "changing the nickname to " + xx.newnick;
last = Core.GetChannel(xx.lastplace);
if (last.ContainsUser(xx.newnick))
{
action += " and " + xx.newnick + " is still in the channel";
}
else
{
action += ", but " + xx.newnick + " is no longer in channel";
}
item nick2 = getItem(xx.newnick);
if (nick2 != null)
{
TimeSpan span3 = DateTime.Now - nick2.LastSeen;
switch (nick2.LastAc)
{
case item.Action.Exit:
action += " because he quitted the network " + span3.ToString() + " ago. The nick change was done in";
break;
case item.Action.Kick:
action += " because he was kicked from the channel " + span3.ToString() + " ago. The nick change was done in";
break;
case item.Action.Part:
action += " because he left the channel " + span3.ToString() + " ago. The nick change was done in";
break;
}
}
break;
case item.Action.Part:
action = "leaving the channel";
break;
case item.Action.Talk:
action = "talking in the channel";
last = Core.GetChannel(xx.lastplace);
if (last != null)
{
if (last.ContainsUser(nick))
{
action += ", they are still in the channel";
}
else
{
action += ", but they are not in the channel now and I don't know why, in";
}
}
break;
case item.Action.Exit:
string reason = xx.quit;
if (reason == "")
{
reason = "no reason was given";
}
action = "quitting the network with reason: " + reason;
break;
}
TimeSpan span = DateTime.Now - xx.LastSeen;
if (xx.LastAc == item.Action.Exit)
{
response = "Last time I saw " + nick + " they were " + action + " at " + xx.LastSeen.ToString() + " (" + RegularModule.FormatTimeSpan (span) + " ago)";
//.........這裏部分代碼省略.........