egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

unload

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
x-treem
Voice


Joined: 21 Jul 2008
Posts: 9

PostPosted: Fri Dec 19, 2008 12:58 pm    Post subject: unload Reply with quote

is there a way to link to an event that pops when bot is forced to shutdown? for instance if i'm connected to somewhere to let a script clean up things and disconnect prior to close.
Back to top
View user's profile Send private message
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Fri Dec 26, 2008 5:32 pm    Post subject: Reply with quote

The answer depends entirely on how/why the bot is forced to shutdown. For example, a kill -9 <pid> from the bot's shell is immediate and would not allow time to execute code.

Generally, the EVNT bind is used to trigger Tcl code with a number of available types associated with shutdown (see tcl-commands.html in your bot installation).

sighup = kill -HUP <pid> OR kill -1 <pid> (hangup process)
sigill = kill -ILL <pid> OR kill -4 <pid> (illegal instruction)
sigquit = kill -QUIT <pid> OR kill -3 <pid> (quit process)
sigterm = kill -TERM <pid> OR kill -15 <pid> (terminate nicely)

I think I have the correct numeric kill signals. It is not clear in tcl-commands.html

I have never used these EVNT bind types, so I am not aware to what extent they would allow execution of Tcl before shutdown, neither am I aware of the shutdown type resulting from say the command .die in the partyline. Terminate nicely I would hope.

I can only suggest you experiment with them. Sorry I can't be of any further assistance.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber