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 

This would be simple right?

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


Joined: 16 Jun 2010
Posts: 1

PostPosted: Wed Jun 16, 2010 12:04 pm    Post subject: This would be simple right? Reply with quote

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.
Back to top
View user's profile Send private message
dj-zath
Op


Joined: 15 Nov 2008
Posts: 134

PostPosted: Sat Jun 19, 2010 8:29 am    Post subject: Reply with quote

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! Smile

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

-DjZ-
Smile Smile
Back to top
View user's profile Send private message Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Jul 06, 2010 2:56 am    Post subject: Re: This would be simple right? Reply with quote

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.

Quote:

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:

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. Smile

Let us know if it does what you wanted.


p.s. "Auto" anything is really not very secure.
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