line from the IRC server ":punch.va.us.dal.net 353 botname = #my_cha :botname @person1 @person2"
that's the names list given by the irc server. I'm attempting to read the names in to a list array
but rearrange the list so that the names begging with the "@" symbol come first.
all I have is:
ArrayList arrUsers = new ArrayList();
string Names = ":punch.va.us.dal.net 353 botname = #my_cha :botname @person1 @person2";
int offset = Names.LastIndexOf(":");
string parseNames = Names.Substring(offset, Names.Length-offset);
string[] strSplit = parseNames.Split(' ');
arrUsers.AddRange(strSplit);
foreach (string name in arrUsers)
{
if (name.Contains("@"))
{
arrUsers.Insert(0, name);
}
MessageBox.Show(name);
}

New Topic/Question
Reply



MultiQuote




|