ive tried this to assign a color to each character in the text but it seems to do for the entire sentence instead of per character:
Code: Select all
set xfgx {00 08}
set xbgx {01 02 05 06 10 12}
proc wildcharcolor {text} {
set xmfgx [lindex $::xfgx [rand [llength $::xfgx]]]
set xmbgx [lindex $::xbgx [rand [llength $::xbgx]]]
set xsepx "\003${xmfgx},${xmbgx}"
set xregx $xsepx
for {set i 0} {$i<=[string length $text]} {incr i} {
append xregx [string index $text $i]$xsepx
}
return $xregx
}
bind pub -|- !xcols pub:text:rcolors
proc pub:text:rcolors {nick uhost hand chan text} {
if {![isatleasthalfop2017ewa $nick $chan]} { return 0 }
set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }]
putserv "privmsg $chan :[wildcharcolor $text]"
}