on *:input:#:input.event $1-
on *:input:?:input.event $1-
on *:input:=:input.event $1-
alias -l input.event {
if (($ctrlenter) || ((/* !iswm $1-) && ($iif($readini(mirc.ini,text,commandchar),$v1,/) $+ * !iswm $1-))) {
var %org = $strip($1-)
var %max = $len(%org)
if (%max <= 110) {
if (%rk.ie.colors == $null) set %rk.ie.colors 01 02 12 10 11 10 12 02 01 02 12 10 11 10 12
var %new
var %lastchar
var %space = $chr(32)
var %i = 1
while (%i <= %max) {
var %new = %new $+ $iif(%lastchar == %space,$v1) $+ $+ $left(%rk.ie.colors,2) $+ $mid(%org,%i,1)
set %rk.ie.colors $mid(%rk.ie.colors,4) $left(%rk.ie.colors,2)
var %lastchar = $mid(%org,%i,1)
inc %i
}
say %new
halt
}
}
}
* I couldnt get the on inputs to work as one with #?= so i made 3 and called the routine.
* It doesnt convert lines begining with the prefix character or / unless you have ctrl down.
* It doesnt convert lines over 110 becuase while it could do a line double that, the irc servers dont deal lines over 440 characters aprox, and each character needs 3 extras, hence 440 / 4 110
* The colors 01 02 12 10 11 10 12 02 01 02 12 10 11 10 12 rotate around, and dont reset each line entered, if u wanted them to then remove
if (%rk.ie.colors == $null) * tested but not riggeruosly.