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.

code structing question

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:

code structing question

Post by droolin »

I rewritting two scripts due to some conflicts with raw and CTCP binds, and while I am at it I'm trying to do some code clean up. Thus, my question.
Can I call procedures from one tcl script file out of another one if they are both loaded? Are the global variables declared in one script accessable by another one? Hmmmm, I've seen varaibles defined in the startup config file used throughout various scripts, so I would say yes to the variable question? This is a security eggdrop, so each script would be always loaded.
Reason I ask, is that I am resturcturing a couple of the bind events so that they parse the information and call the appropiate procedure based based upon basic selection criteria. Im doing this so that the bind procedures arnt a bundle of code that is dealing with different types of things to be done. Basicatly, the simple selection criteria dictates how I parse out information from various data strings.
If I can split out this logic further into seperate tcl scripts, I would like to if possible. Would simplyfy modifications and testing down the road. I have a feeling that this eggie will be under continous modification based upon new threats as they are identified.
Any input would be most welcome please. Also, if you feel this is a stupid idea. Please tell me.

droolin
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Re: code structing question

Post by egghead »

droolin wrote:Can I call procedures from one tcl script file out of another one if they are both loaded?
Yes.

droolin wrote:Are the global variables declared in one script accessable by another one?
Yes.

Note that if you use similar binds in the different scripts, those binds must be "stackable" (refer to tcl-commands.doc).
droolin wrote:I have a feeling that this eggie will be under continous modification based upon new threats as they are identified.
"new threats"... interesting statement :( :-?
User avatar
droolin
Halfop
Posts: 64
Joined: Thu Jul 24, 2003 9:07 pm
Contact:

structuring question

Post by droolin »

Thank you for your reply, it was very much appriceated.

The comment about new threats deals with the various infected clients and such that seem to be all to dominate anymore on IRC. We have other services that identify alot of these problems, but unfortionally we have come to the conclusion that additioanl protection was needed. Thus the security eggie.

Watching various other bulleton boards and news letters, there seems to be a new variant out every day of some new type of infection that affects IRC. Thus, the new threats. :cry:

Again, thank you for your post.

droolin
Locked