View Single Post
Old 10-31-2003, 06:05 PM  
bounty
Senior Member
 
Join Date: Aug 2002
Posts: 529
Default Re: Some TCL help

Quote:
Originally posted by ddeca
How do I make this output on a singel row

Code:
#########################################################
# SHOWING STATS AUTOMATICALY ON IRC                     #
#########################################################
proc proc_ircstats {mins hour day month year} {
	global binary disable ircstats_req ircstats_max
	if { $disable(IRCSTATS) == 0 } {
		foreach ircstat $ircstats_req {
			set stats_output ""
			set result [exec $binary(IRCSTATS) userstats $ircstat $ircstats_max]
			set stats_output "%bold%color5\[[string toupper $ircstat] TOP\]%color +%bold "
			#set output [basicreplace $output ""]
			#sndall "DEFAULT" $output
			foreach line [split $result \n] {
				if { $line == "" } { continue }
				append stats_output "\[[lindex $line 0]. [lindex $line 1] %bold[lindex $line 4]%boldM\] "
			}
			set output [basicreplace $stats_output ""]
			sndall "DEFAULT" $output
		}
	}
}
should do the job
bounty is offline   Reply With Quote