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.

How to kill an identitifed timer

Old posts that have not been replied to for several years.
Locked
g
gerkes

How to kill an identitifed timer

Post by gerkes »

I have a script that ctcp versions a user on join a channel.
It adds the user's hostmask, and then sets a 60 sec timer to check if the user has a valid version reply.

So all in all it works fine.

This is the 60 sec timer triggered off,

#adding user's nick, ident and ip to record book
addhost ~vchk $nick!$uhost
#verifying user status 60 seconds later
utimer 60 "checkverreply $nick $nick!$uhost"

When the user replys the version,
my script will delhost ~vchk $nick!$uhost.

However I would like to delete off the timer as well when the user replies to version, due to possible join/part floods by some people.

How do I identify the timer properly and kill it?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Get the return value of the utimer command and save it. It is the timer id. Pass it to killutimer to stop it.

Also, you should really use [list checkverreply $nick $nick!$uhost] instead of "checkverreply $nick $nick!$uhost" so that it won't kill the bot with a nick like [die].
g
gerkes

Post by gerkes »

Where do you propose I save it actually? I've been thinking hard but havent really found a suitable solution for it.

Can i please have the command to save it, and the command to also call it out to kill it?

Thanks
Locked