add this proc to your code:
Code:
proc greet:parse {greet} {
set greet [string map { %nick% $nick %chan% $chan} [split $greet]]
return $greet
}
and in your join process replace this:
Code:
putserv "NOTICE $nick :$nick, [::stats::channel -get $chan greet]"
with:
Code:
set greet [::stats::channel -get $chan greet]
putserv "NOTICE $nick :[greet:parse $greet]"
also hope you didn't change what AdrianK stated before, because as far as I can tell that line is from the a:tell process and it is used to define the colors that the bot will output your text in. So if you changed it, put it back :P
Enjoy!