precompiles the MTS theme input into its mIRC parseable equivalent.
alias mtsprecompile {
var %v = me|server|echo|address|fromserver|c1|c2|c3|c4|newnick|serverinfo|away|iaddress|nick|signontime| $+ $&
idletime|numeric|target|isoper|operline|text|isregd|port|users|kaddress|parentext|value| $+ $&
chan|knick|pre|wserver|cmode|raddress|cnick|modes|realname|ctcp|naddress, %eval = $iif($2,2,1)
!noop $regsub($1-,/<( $+ %v $+ )>/g,$+(%,::,\1),%x))
!noop $regsub(%x,/(\S)%/g,$+(\1,$chr(32),$!+,$chr(32),%),%x))
!noop $regsub(%x,/(%::(?: $+ %v $+ ))(\S)/g,$+(\1,$chr(32),$!+,$chr(32),\2),%x))
!noop $regsub(%x,/(\S)\133/g,$+(\1,$chr(32),$!+,$chr(32),$!chr(91),$chr(32),$!+,$chr(32)),%x)
!noop $regsub(%x,/(\S)\135/g,$+(\1,$chr(32),$!+,$chr(32),$!chr(93),$chr(32),$!+,$chr(32)),%x)
!noop $regsub(%x,/\133(\S)/g,$+($chr(32),$!+,$chr(32),$!chr(91),$chr(32),$!+,$chr(32),\1),%x)
!noop $regsub(%x,/\135(\S)/g,$+($chr(32),$!+,$chr(32),$!chr(93),$chr(32),$!+,$chr(32),\1),%x)
return $($replace(%x,$(%::echo,),$(%:echo,),[,$!chr(91),],$!chr(93)),%eval)
}
MTS is in the form of
's <> kicked 's butt this should be interperitted by mIRC like this: %::chan $+ 's < $+ %::knick $+ > kicked %::nick $+ 's butt . What this alias does is it allows you to return the first form or the evalled form by just passing the alias $mtsprecompile('s kicked 's butt,EVAL).