I am using a JOIN bind to initiate a scan of the users in a specific IRC channel when it is the bot itself that joins the channel. However, the bot has not had chance to update [chanlist $chan] which returns botnick only, irrespective of who else is on the channel. So I wish to use a utimer to allow the bot time to update the channel list before attempting a scan.
The proc npScan requiring a single argument $chan is called to execute the scan.
utimer 10 [npScan $chan] ... works but executes the scan immediately rather than after the expected 10 seconds ... so only the botnick is in the channel list
utimer 10 [list npScan $chan] ... gives a tcl error in script for 'timerXX' - invalid command name npScan
utimer 10 {npScan $chan} ... gives a tcl error in script for 'timerXX' - can't read "chan"; no such variable
I can only assume that calling a proc rather than invoking a recognised tcl command in the utimer statement is the cause of the problem. I can't find the correct syntax (assuming it's possible). Any help would be appreciated.