Stary2001

Untitled

Sep 22nd, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public static string GetNickserv(string nick)
  2. {
  3. string s = null;
  4.  
  5. irc.WriteLine("WHO " + nick + " %na");
  6. string resp = irc.ReadLine(true);
  7.  
  8. string[] split = resp.Split(new char[] { ' ' });
  9. if (split[1] == "354") // 0 is host!
  10. {
  11. if (split[4] != ":End")
  12. {
  13. s = split[4];
  14. irc.ReadLine(true); // to eat the "end of list" notification
  15. }
  16. }
  17. else
  18. {
  19. return GetNickserv(nick); // try again!
  20. }
  21.  
  22. return s;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment