Hi I need some modification help with my script. I want it to count kicks and remember last kicked person and put it to kick reason near phrase that it tooks from file. This is what I do myself:
I am not even going to ask why you want to do this, but ... just some comments:
I would assign the chanlist nlist to a variable as it is possible (I am assuming) that as it has to be evaulated twice you could get a mismatch between the random number and the list of nicks. You do not seem to be avoiding kicking the nick of the bot itself.
Depending on what you wish to have more of - memory or I/O overhead - either load up the test file of reasons just once and access it as a global or (do as you are doing) read it each time.
Please bear in mind that tcl is not my long suit! - others may have better ideas to improve.
Oh, before I forget - do not forget to check the file exists (and is readable by the bot)!