Advertisement
Guest User

Untitled

a guest
Dec 21st, 2011
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. public void checkOnline()
  2.         {
  3.             XDocument doc = XDocument.Load("http://api.own3d.tv/liveCheck.php?live_id=" + OTVid, LoadOptions.PreserveWhitespace);
  4.             int count = (from e in doc.Descendants("isLive") where (bool) e select e).Count();
  5.             if (OTVstreamOnline) //can this be somehow changed to like, if count = 1, then OTVonlineStreams++; (how would I do this?)
  6.             {
  7.                 OTVonlineStreams++;
  8.             }
  9.             else
  10.             {
  11.                 OTVonlineStreams--; //if it doesn't return 1 (returns 0), then OTVonlineStreams--;
  12.             }
  13.             OTVAnnounce();
  14.             Console.WriteLine(OTVnick + " online = " + count);
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement