View Single Post
Old 10-31-2003, 01:59 PM  
ddeca
Member
 
Join Date: Aug 2003
Posts: 73
Default Some TCL help

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 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
		}
	}
}
This is ther Current Output
-------------------------------------------------

[7:51pm] <|botname|> [WKUP TOP] +
[7:51pm] <|botname|> [01. user1 28333M] [02. user2 716M] [03. User3 345M]
[7:51pm] <|botname|> [WKDN TOP] +
[7:51pm] <|botname|> [01. user1 26895M] [02. user2 4578M] [03. user3 2102M]


Want this
-------------------------------------------------
[7:51pm] <|botname|> [WKUP TOP] + [01. user1 28333M] [02. user2 716M] [03. User3 345M]
[7:51pm] <|botname|> [WKDN TOP] + [01. user1 26895M] [02. user2 4578M] [03. user3 2102M]


TIA ddeca
ddeca is offline   Reply With Quote