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 

Enabl and Disable script

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


Joined: 10 Jan 2006
Posts: 139

PostPosted: Fri Nov 17, 2006 5:00 am    Post subject: Enabl and Disable script Reply with quote

Is there anyways to make a public command for Enabling and Disabling a script?
Like example:
!scriptname on
!scriptname off

If this has already been covered in another topic, im sorry for my bad search.
Back to top
View user's profile Send private message
deadite66
Halfop


Joined: 30 May 2005
Posts: 74
Location: Great Yarmouth, UK

PostPosted: Fri Nov 17, 2006 7:37 am    Post subject: Reply with quote

http://www.eggheads.org/support/egghtml/1.6.18/tcl-commands.html

eggdrop has bind and unbind, so you could have a separate procedure to disable/re-enable a bind
_________________
<- tcl newb
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Fri Nov 17, 2006 1:47 pm    Post subject: Reply with quote

Example:

Code:
setudef flag blascript

bind PUB -|- !bla pub:blascript

proc pub:blascript {nickname hostname handle channel arguments} {
  if {[string equal "on" [set type [lindex [split $arguments] 0]]]} {
    channel set $channel +blascript
  } elseif {[string equal "off" $type]} {
    channel set $channel -blascript
  } elseif {![channel get $channel blascript]} {
    return 0
  } else {
    # Do something here
  }
}


You should be able to implement something similar for your own script(s).[/code]
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