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.

This would be simple right?

Help for those learning Tcl or writing their own scripts.
Post Reply
D
DrFeelGood
Voice
Posts: 1
Joined: Wed Jun 16, 2010 11:58 am

This would be simple right?

Post by DrFeelGood »

Hey guys,

Im wanting to learn how to write TCL scripts for my eggdrop, and I was wondering how simple this would be, I currently do it with an mIRC Script, but my mirc keeps dropping....

Im my channel right now, if a user is a female, she can type !female and my mirc script will voice her, it also add's that users name & ip to a file, and if they leave & rejoin, it auto voices her without her having to type !female

Would something like this be easy to do with an eggdrop? I've mainly uses eggies fun stuff like trivia, etc, but this is my first time doing something user management wise

Thanks
FeelGood.
d
dj-zath
Op
Posts: 134
Joined: Sat Nov 15, 2008 6:49 am
Contact:

Post by dj-zath »

hi there Dr!

The answer to your question is "yes".. an eggie can easily perform this task..

But learning TCL is not so easy.. unfortunately.. TCL is NOT .mrc and the 2 are completely different!

Luckly, theres plenty of resources out there that can help you along.. You can visit http://www.tcl.tk to get yourself a good start.

Like you, I had to learn TCL "to get the job done" and I have come along.. but, I'm in no ways, anywhere as good as Nml, Speechles, FZ, Caesar, and a few others on here (this is the place for the top minds for TCL!).

My advice to you is to make sure you have a fresh mind- get plenty of sleep and do NOT find yourself in a hurry to learn it.. because that won't happen!

look for some example scripts.. one's that tell you and/or explain what they do.. and try to understand the sintax.. TCL does have a "steep learning curve" but its not impossable to pick up (PHP is easier to learn) and admittedly, some of the resources are "not friendly to the beginner", but, if you take your time, and understand the sintax/basics.. you'll be writing your own scripts in no-time.

One of the things I like about TCL is, theres a few ways you can do things.. not saying that these ways are the "best" ways or most-efficient (that comes with experience) but nonetheless, it still makes you feel good when it works! :)

I hope this post helps you feel ready for the task ahead :)

-DjZ-
:) :)
w
willyw
Revered One
Posts: 1209
Joined: Thu Jan 15, 2009 12:55 am

Re: This would be simple right?

Post by willyw »

DrFeelGood wrote:Hey guys,

Im wanting to learn how to write TCL scripts for my eggdrop, and I was wondering how simple this would be, ...
Excellent reference material:
Look in your /doc directory and find a file named " tcl-commands.doc" . It contains Eggdrop specific TCL commands.

Next:
http://suninet.the-demon.de/
"Guide to TCL scripting for Eggdrop 1.6"
It starts at the very beginning, and is easy to follow.

Next:
http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm
TCL command reference

With the above three things, you can do a LOT.
Im my channel right now, if a user is a female, she can type !female and my mirc script will voice her, it also add's that users name & ip to a file, and if they leave & rejoin, it auto voices her without her having to type !female

Would something like this be easy to do with an eggdrop? I've mainly uses eggies fun stuff like trivia, etc, but this is my first time doing something user management wise

Thanks
FeelGood.

Code: Select all

bind pub - "!female" add_autovoice

proc add_autovoice {nick host handle chan text} {

#voice user right now
pushmode $chan +v $nick

#add user to bot's userlist
adduser $nick [maskhost $nick![getchanhost $nick $chan]]

#change user's flags
chattr [nick2hand $nick $chan] |+g $chan

}
Save that to a file, and load it with a source line in your eggdrop.conf .

It works for me. :)

Let us know if it does what you wanted.


p.s. "Auto" anything is really not very secure.
Post Reply