This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

waiting a specified time for a response

Old posts that have not been replied to for several years.
Locked
b
bigjb

Post by bigjb »

I am trying to write a proc within a script that will send a request to an op in the channel, if the op doesnt type "accept" within a set period, then the script moves on to the next op until it either recieves the specified response or has checked all the ops at which point it performs a different operation.

proc adminMsgReport { nick } {
foreach { hasAdmin [chanlist $botchan] } {
if { isop $hasAdmin $botchan } {
#output to admin and wait for response
}
}
}

this is what i have so far, but im really not sure how to approach above. (this procedure isnt called by a bind originally). i understand that i shoudld use a timer, but im not sure how to go about catching the response to stop the timer and quit the loop.

Any help or suggestions would be helpful please :smile:
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Use a bind to catch the response. Use a timer to measure the delay. Use killtimer/killutimer to cancel the timer if someone responds in time.
Locked