本文整理汇总了C#中wmib.config.containsUser方法的典型用法代码示例。如果您正苦于以下问题:C# config.containsUser方法的具体用法?C# config.containsUser怎么用?C# config.containsUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wmib.config
的用法示例。
在下文中一共展示了config.containsUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RetrieveStatus2
public void RetrieveStatus2(string nick, config.channel channel, string source)
{
try
{
string response = "I have never seen " + nick;
bool found = false;
string action = "quiting the network";
foreach (item xx in global)
{
if (nick.ToUpper() == xx.nick.ToUpper())
{
found = true;
config.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() + " (" + span.ToString() + " ago)";
}
response = "Last time I saw " + nick + " they were " + action + " " + xx.lastplace + " at " + xx.LastSeen.ToString() + " (" + span.ToString() + " ago)";
//.........这里部分代码省略.........