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 do you detect when a nick quits the network?

Old posts that have not been replied to for several years.
Locked
User avatar
droolin
Halfop
Posts: 64
Joined: Thu Jul 24, 2003 9:07 pm
Contact:

how do you detect when a nick quits the network?

Post by droolin »

ok, you can have parts from channels. the part bind. nicks that split off, the split bind. But, how can you determine when a nick just clicks the big x in the corner, and quits the network. Or is killed for what ever reason.
Thank you for all of the help by the way. It is definatly most appriceated.


droolin
User avatar
z_one
Master
Posts: 269
Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada

Post by z_one »

Code: Select all

bind sign - * quitproc
proc quitproc {nick uhost hand chan text} { 
  putlog "$nick just quit" 
}
User avatar
droolin
Halfop
Posts: 64
Joined: Thu Jul 24, 2003 9:07 pm
Contact:

thank you

Post by droolin »

for some reason when I looked at that in the tcl-commands, I read that the meaning of what that did totally wrong. Now I feel totally stupid. Thank you very much.

droolin
User avatar
droolin
Halfop
Posts: 64
Joined: Thu Jul 24, 2003 9:07 pm
Contact:

thank you again, and a question

Post by droolin »

Thank you for that response, that solved my problem. Big time.

Can I ask a performance question now? Alot of programming lanugauges teach you that you should have your most often used code at the top of your source. What gets executed the most. Would you say that is also a good practice with TCL? The most often triggered binds and procedures at the top of the source, with the least used binds and procedures near the bottom??? Also, which of the following is considered a good codeing practice? Grouping all binds in one area of the source? Or grouping the binds with the procedures that are executed from them??
I now have my script working the way I want(lol, it actualy works). I want to go through my code now and clean it up for some things I know just can be done better. That's the reason I ask these questions...
Again, thank you for your time. Most appriceated.

droolin
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

most scripts I've seen, usually, have all the binds grouped together.

anyway, I always group all binds together.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

i realy don't care sometimes i put them to gether what suits me best at the time i gues sometimes i prefer to add the bind to the proc but i always put all the sets to gether so if i edit the script i don't have to go true it all

but to answer your question: i don't think it mathers cause its loaded into mem and i gues that means the eggdrop will sort that out by it self and put all the bind procs .. together ..
XplaiN but think of me as stupid
Locked