All pastes #443481 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-16 20:39 UTC
rendered paste body
alias c1 { return $+($chr(3),12,$1-) } 
alias c2 { return $+($chr(3),13,$1-) } 
alias c3 { return $+($chr(3),04,$1-) } 

on *:connect:#:{
  /timer 0 30 
if ($sock(newss)) .sockclose news
sockopen newss www.runescape.com 80
}

  on *:SOCKOPEN:newss: {
    sockwrite -nt $sockname GET /lang/en/aff/runescape/title.ws HTTP/1.1
    sockwrite -nt $sockname Host: www.runescape.com
    sockwrite -nt $sockname $crlf
  }

  on *:SOCKREAD:newss: {
    if ($sockerr) { $gettok($sock($sockname).mark,1,64) Er is een error met de socket. Sorry, $gettok($sock($sockname).mark,2,64) $+ ! }
    else {
      var %sockets
      sockread %sockets
      if (*class="newsdate">*</span>*/dt>* iswm %sockets) {
        tokenize 32 $htmlfree($replace($gettok(%sockets,3,34),</span>,$chr(32)))
      }
      if ($readini(news.ini,NEWs,Titel) == $htmlfree($2-)) { 
        /amsg $c3(<) $+ $c2 Rs-nieuws $+ $c3(>) $c2(Date) $+ $c3(:) $+ $c1 $htmlfree($1) $c2(Topic) $+ $c3(:) $+ $c1 $htmlfree($2-) 
      }
      if (*<td style="text-align: justify; vertical-align: top;">*</td>* iswm %sockets) {   
        tokenize 32 %sockets
        /amsg $c2(Nieuws) $+ $c3(:) $+ $c1 $htmlfree($gettok(%sockets,3,34)) 
      }
      if (*<div style="margin-top: 0.5em;"><a href="*">* iswm %sockets) {
        tokenize 32 %sockets 
        /amsg $c2(Link) $+ $c3(:) $+ $c1 $gettok(%sockets,4,34)
        unset %newssway
        sockclose newss
      }
    }
  }