Hello @maroon and thank you very much for your extensive explaination of your code.

As I see you are a real mIRC veteran grin Can you tell me what you are doing for a living and what was your greatest project on mIRC scripting?


To understand your code, I have a few questions I hope I may ask:

1. Why do you use
Code
$parms
instead of
Code
$1-
? In mIRC help it says, $parms is an untokenized $1-. What would change that in output?


2. What exaxtly does this do?
Code
var -p %str $+(%str,$v2)
For me it sets the variable %str to "%str_" (_=space) when
Code
%char == $chr(32)
Why do we need to specify the variable %str already on this line? Because later in
Code
var -p %str $+(%str,$chr(3),$v1,%char)
the variable %str gets changed anyways. Am I assuming right, that
Code
$v2
refers to the "$chr(32)" in
Code
if (%char == $chr(32))
?


3. What is the "32" in
Code
$gettok(%colors,$rand(1,9),32
for? I assume ascii code for "space", but I don't fully understand $gettok. In mIRC help it says "Returns the Nth token in text". I don't understand "Nth". You also used it here:
Code
$gettok($v1 %recentcolors,1-3,32)


4. Why do you first set the while loop for checking about recent used colors in
Code
while ($gettok(%colors,$rand(1,9),32) isin %recentcolors) noop
and after that, you set the variable %recentcolors to the values which were used last using
Code
var %recentcolors $gettok($v1 %recentcolors,1-3,32)
? Until here %recentcolos is empty or $null anyways, or not?


5. What is the "$v1" in
Code
var %recentcolors $gettok($v1 %recentcolors,1-3,32)
and
Code
var -p %str $+(%str,$chr(3),$v1,%char)
refering to?


6. Whats the advantage of using an "!" on
Code
!msg $chan %str
?



Thank you in advance. With much respect,

Housecat