Advertisement
illpastethat

rs 2007 poll

Feb 24th, 2013
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.69 KB | None | 0 0
  1. on $*:TEXT:/^[!.@](votes|poll)/Si:#: {
  2.   if ($sock(poll)) sockclose poll
  3.   sockopen poll services.runescape.com 80
  4.   set %poll.chan $chan
  5. }
  6. on *:SOCKOPEN:poll:{
  7.   sockwrite -nt $sockname GET /m=poll/retro_ajax_result HTTP/1.1
  8.   sockwrite -nt $sockname Host: services.runescape.com
  9.   sockwrite -nt $sockname $crlf
  10. }
  11. on *:SOCKREAD:poll:{
  12.   if ($sockerr) { halt  }
  13.   sockread &t
  14.   if (*votes* iswm $bvar(&t,1-).text) {
  15.     var %pos $bfind(&t,1,123)
  16.     var %pos2 $bfind(&t,%pos,125)
  17.     if (%pos2 != 0) {
  18.       var %sockreader $bvar(&t,$+(%pos,-,$calc(%pos2 + 1))).text
  19.       msg %poll.chan Runescape 2007 votes: $bytes($remove(%sockreader,"votes":,$chr(123),$chr(125)),bd)
  20.     }
  21.   }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement