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.

bind triggered after restart or on bot startup?

Old posts that have not been replied to for several years.
Locked
D
DayCuts
Voice
Posts: 37
Joined: Tue Jun 15, 2004 8:43 am

bind triggered after restart or on bot startup?

Post by DayCuts »

what would i use to set a script/proc to run when a bot is started up or .restart 'ed, i know there is a EVNT prerestart, but i wish to have a proc triggered once the restart has finished, my first thought was evnt rehash, but this would trigger on rehashes but i want it to trigger only on restarts. Also i want this proc to be triggered after an initial startup

proc will be used for loading a tcl list from a backup db when the bots starts and when the bot is restarted (since lists are cleared on .restart's)

tia to anybody who can point me in the right direction : )
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

You could always use bind filt to execute a command only on .restart

Code: Select all

bind filt - ".restart" custom:restart
proc custom:restart {idx arg} { 
  # Your code goes here
  return $arg
}
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

Code: Select all

bind evnt - loaded evnt:loaded
proc evnt:loaded t {
  putlog "$::lastbind triggered"
# do stuff
}
photon?
D
DayCuts
Voice
Posts: 37
Joined: Tue Jun 15, 2004 8:43 am

Post by DayCuts »

thank you spock
Locked