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.
that should not be done by timer - you never know how long it would take to resync after join - typically it's about 2-3 secs, but it might be 5, 10 or more; generally, nothing bound to irc dynamics should be done by timer - irc is event-driven system, and timers in eggdrop really do have very few sane uses
instead, bind to raw 315 (End of /WHO List) - upon entering a channel, eggdrop issues WHO #chan command and subsequently receiving 315 means resync has been completed and the bot now has its [chanlist] properly constructed
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use