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.

Need help to set User Defined channel set for a tcl

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
e
ege
Voice
Posts: 6
Joined: Thu Jul 25, 2013 10:23 pm

Need help to set User Defined channel set for a tcl

Post by ege »

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
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

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: Select all

setudef flag explain
and

Code: Select all

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
e
ege
Voice
Posts: 6
Joined: Thu Jul 25, 2013 10:23 pm

Post by ege »

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 :)
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

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.
Post Reply