All pastes #426799 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-06 12:27 UTC
rendered paste body
 proc traitement {sock} {
    global url
    set headers [egghttp:headers $sock]
    set body [egghttp:data $sock]
    regsub -all "\n" $body "" body
    regsub -all -nocase {<br>} $body "<br>\n" body

#putlog $body

foreach line [split $body \n] {

 regexp {<font title=\"Added (.*)</font>} $line - DH #2007-04-05 23:20:51">2007-04-05
 set date [string range $DH 0 9]
 set heure [string range $DH 11 18]

if {![string match "*nuked*" $line]} {
 regexp {</font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.*)<br>} $line - rlz
}
else {
  regexp {</span></a>&nbsp;(.*)<br>} $line - rlz
    }

putserv "PRIVMSG #plop : $date ### $rlz ### $heure"

  }

}


bind pub - !lastseriez lastseriez

proc lastseriez { nick uhost hand chan text } {

global url 
set sock [egghttp:geturl $url traitement]
return 1

}