- public static string GetNickserv(string nick)
- {
- string s = null;
- irc.WriteLine("WHO " + nick + " %na");
- string resp = irc.ReadLine(true);
- string[] split = resp.Split(new char[] { ' ' });
- if (split[1] == "354") // 0 is host!
- {
- if (split[4] != ":End")
- {
- s = split[4];
- irc.ReadLine(true); // to eat the "end of list" notification
- }
- }
- else
- {
- return GetNickserv(nick); // try again!
- }
- return s;
- }