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 

on / off switch via console

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Elfriede
Halfop


Joined: 07 Aug 2007
Posts: 67

PostPosted: Fri Dec 09, 2011 6:10 am    Post subject: on / off switch via console Reply with quote

Hi everyone Smile

Hopefully someone can help me on that. Ive a small script, that needs an on/off switch for a specific command.

In the following example id like to have eg:

.chanset !this off

like this Smile

Code:

proc beta_recv    {from command text} {
   set type [lindex [split $text] 0]
   switch $type {
      "!this"   { sendmsg #chan "$text" }
      "!that"   { sendmsg #chan "$text" }
      "!somethg"   { sendmsg #chan "$text" }
   }
}


Would be awesome, if someone would write that for me Smile

Thanks a lot
Back to top
View user's profile Send private message
Johannes13
Halfop


Joined: 10 Oct 2010
Posts: 46

PostPosted: Tue Jan 31, 2012 2:08 pm    Post subject: Reply with quote

setudef flag !this

set it with .chanset +!this or .chanset -!this

check it in the script with [channel get $channel !this]
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 -> Script Requests 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