Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: Stary2001 on Sep 22nd, 2012  |  syntax: None  |  size: 0.65 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.         }