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.

creating an event to bind on ?

Old posts that have not been replied to for several years.
Locked
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

creating an event to bind on ?

Post by Ofloo »

how do i create an event in tcl to bind an on ?? like bind pub n something script

how can i replicate this proces ?
XplaiN but think of me as stupid
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

By learning C and writing a patch/module :P
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

no i wana do it in tcl not in C, also if i wanted to know it in C and not in tcl would of gone to an other forum
XplaiN but think of me as stupid
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

callevent - but only for the evnt bind type. Otherwise you can't.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

hmm callevent is for eggdrops not for tcl ..

but this is for tk Tk_CreateEventHandler(tkwin, mask, proc, clientData)
XplaiN but think of me as stupid
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Post what you've tried.

Wait a second, this is for the Tk C library? You just said it was for tcl, not C. So what are you talking about?
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

i mean callevent is for eggdrop specific its not for C but it is for a tcl shell script ;)
XplaiN but think of me as stupid
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

;) You just said, "this is for Tk_CreateEventHandler(tkwin, mask, proc, clientData)", right? That's C. You are not being clear at all. Maybe you should start over and explain more?
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

Well as u know i wana make services in tcl for my network .. thing is , i want it to be simular to eggdrop like scripting so if people wana script for it they don't have to learn an entire new set of commands and not have to edit hughe amount of code, sinds i don't know C i can't write a C driven service with a tcl plugin what i do know is a bit tcl php .. , so i wana use those to make a service that works with mysql, witch most people want and i want to make it so that people could add there own stuff if they want, cause these days there is a load of services but there not exactly what i expect them to be .. so .. if i would know C i would make it in C and make an interface but i don't so ..i got most of it just the version check on connect is a pain the proxy checking system

cause people have to be albe to script for it well then i have to make binds if you know what i mean caus other wize they have to work in my code witch can be verry tricky :p so i was wondering if i could replicate bind PUB bind MSG ... and so on
XplaiN but think of me as stupid
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

It's pretty easy to make a bind proc. Your bind proc has to have a global variable to store the binds in. When bind is called, it adds the proc arg to the proper list. Then you need some kind of callbind proc, and it will call each item in the proper list, using that same global variable. I'd use an array for the types of bind tables, and each entry in the array should be a list of procs that are bound to that table. Simple.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

sorry i am not with u could u explain .. bit ?? or give an example i am not that technical but if i see the code i understand .. not that good with words :p hehe sorry
XplaiN but think of me as stupid
Locked