All pastes #838829 Raw Edit

Stuff

public text v1 · immutable
#838829 ·published 2007-12-30 18:06 UTC
rendered paste body
bind 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
	}  
}