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 

!enable/!disable Scripts

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
phab
Voice


Joined: 22 Aug 2005
Posts: 12

PostPosted: Mon Aug 22, 2005 6:40 am    Post subject: !enable/!disable Scripts Reply with quote

Hey guys,

I wrote a small "script package". I have a "settings.tcl" where you can define settings for all the other scripts, and you can disable / enable them with "disable<script> 0/1". In every other script I'm checking if this value is 0/1 and then execute or not execute the proc.

Is there another way to do this, maybe a better one?

Thanks Smile
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Mon Aug 22, 2005 10:02 am    Post subject: Reply with quote

Code:

if {$variable} {
# if $variable is bigger or equal with 1 will execute this code
}

Code:

if {!$variable} {
# if $variable is equal with 0 will execute this code
}

my 2 cents Smile
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Aug 22, 2005 11:16 pm    Post subject: Reply with quote

you could spare memory if source componentN.tcl from the main script as necessary
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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