Stuff
public text v1 · immutablebind pub - !siste last
proc last {nick host handle chan cnt} {
set file "scripts/last.php"
set results 3
if { $cnt > 10 || $cnt == "" } {
set cnt $results
}
putserv "PRIVMSG $chan :$nick - Henter de $cnt siste"
set getLast [exec php $file $cnt]
set i 0
while {[regexp {<p>(.*?)</p>} $getLast -> title]} {
if { $i == $cnt || $title == "" } { break }
putserv "PRIVMSG $chan :$nick - \002Tittel:\002 $title"
incr i
}
}