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 

Need help to set User Defined channel set for a tcl

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


Joined: 25 Jul 2013
Posts: 6

PostPosted: Thu Jul 25, 2013 10:29 pm    Post subject: Need help to set User Defined channel set for a tcl Reply with quote

hello,

is it possible to set any tcl to run user defined channels ?

with " setudef " syntax ?

for example for this !learn.tcl :

https://pastee.org/sxdag

thank u
Back to top
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Fri Jul 26, 2013 8:38 am    Post subject: Reply with quote

Yes it can be made
But the script works with a single database so if you add something it will have the same database on all channel where the script is activated.

What you need is line

Code:
setudef flag explain


and

Code:
if {![channel get $chan explain]} { return }


at every proc (only the second line) you want to work only if +explain is set on the channel

You could take a look at this script http://forum.egghelp.org/viewtopic.php?t=19313 it works exactly as learn.tcl but it can have database for every channel and it can be activated/deactivated
_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
ege
Voice


Joined: 25 Jul 2013
Posts: 6

PostPosted: Fri Jul 26, 2013 10:28 pm    Post subject: Reply with quote

thank u a lot Madalin..

so if i add those 2 lines if i apply the command .chanset #chan +explain it will specify the channel right ?

and will this script work for all kind of tcl scripts ?

thank u Smile
Back to top
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Sat Jul 27, 2013 3:44 am    Post subject: Reply with quote

Yes does two lines of code can work on any other tcl that doesnt have a 'chanset' but you have to change 'explain' to whatever else. Anyway as i said your explain script will have the same database on every channel so the part with enable/disable the script on a specified channel is only for disableing the commands.
_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sat Jul 27, 2013 8:48 am    Post subject: Reply with quote

http://forum.egghelp.org/viewtopic.php?p=98052#98052

and

http://forum.egghelp.org/viewtopic.php?p=98054#98054
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