Thread: Multi Lines
View Single Post
Old 02-10-2005, 03:52 AM  
durulink
Senior Member
 
Join Date: Mar 2003
Posts: 102
Default

add 'affils(COLIMN)' under affils config
Code:
set affils(COLUMN)	10
and replace 'proc_affils'
Code:
proc proc_affils {nick uhost hand chan arg} {
	global affils sections announce disable
	if { $disable(AFFILS) == 0 } {
		if { $arg == "" } {
			foreach section $sections {
				if { ! [info exists affils($section)] } { continue }
				set af $affils($section)
				set sl [llength $af]
				for {set i 0} {$i < $sl} { set i [expr $i + $affils(COLUMN)]} {
					set j [expr $i + $affils(COLUMN) - 1]
					if {$j >= $sl} {
						set sr [lrange $af $i end]
					} else {
						set sr [lrange $af $i $j]
					}
					set output $announce(AFFILS)
					set output [replacevar $output "%affils" $sr]
					set output [basicreplace $output $section]
					sndchan "putserv" $chan $output
				}
			}
		} else {
			foreach section $sections {
				if { ! [info exists affils($section)] } { continue }
				if { [string match -nocase $section $arg] == 1 } {
					set af $affils($section)
					set sl [llength $af]
					for {set i 0} {$i < $sl} { set i [expr $i + $affils(COLUMN)]} {
						set j [expr $i + $affils(COLUMN) - 1]
						if {$j >= $sl} {
							set sr [lrange $af $i end]
						} else {
							set sr [lrange $af $i $j]
						}
						set output $announce(AFFILS)
						set output [replacevar $output "%affils" $sr]
						set output [basicreplace $output $section]
						sndchan "putserv" $chan $output
					}
				}
			}
		}
	}	
}
durulink is offline   Reply With Quote