| View previous topic :: View next topic |
| Author |
Message |
na85 Voice
Joined: 29 Jan 2009 Posts: 5
|
Posted: Thu Sep 13, 2012 1:50 am Post subject: Enabling use of UDP sockets |
|
|
Hi everyone. Been searching but can't find the answer to my question.
I want to write a script that sends a simple hex-encoded string via UDP to a particular server. Obviously, Tcl and Eggdrop don't have UDP support.
I've found this link on tcl.tk but I'm still fuzzy on how to actually allow eggdrop to use a udp socket.
Do I need to somehow recompile eggdrop with the tcludp library?
Do I need to ask my shell provider to add the tcludp library to the system?
Would it be easier/possible to write a one-off proc in C? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Sep 13, 2012 2:12 pm Post subject: |
|
|
The linked examples make use of the "Tcl UDP" extension for tcl. There are pre-built modules for windows, however for linux/un*x you'll have to build it against your tcl-library (not against eggdrop).
Generally, you wouldn't have to rebuild your eggdrop for adding new tcl-modules (unlike eggdrop-modules), though you might have to tell tcl where to look for it. Some experience in building/installing custom tcl-modules would be advisable. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
na85 Voice
Joined: 29 Jan 2009 Posts: 5
|
Posted: Thu Sep 13, 2012 3:24 pm Post subject: |
|
|
Hi, thanks for the reply.
| nml375 wrote: | The linked examples make use of the "Tcl UDP" extension for tcl. There are pre-built modules for windows, however for linux/un*x you'll have to build it against your tcl-library (not against eggdrop).
Generally, you wouldn't have to rebuild your eggdrop for adding new tcl-modules (unlike eggdrop-modules), though you might have to tell tcl where to look for it. Some experience in building/installing custom tcl-modules would be advisable. |
So... I haven't asked them yet, but since I'm running eggdrop on one of my shells, wouldn't my provider have to install that?
If that's true, wouldn't it be easier/more feasible to just write a new tcl command in C? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Sep 13, 2012 3:35 pm Post subject: |
|
|
That kind of depends on how the system has been set up, which packages and tools are available, etc.
The extension is not compiled into the tcl-libraries, but merely compiled for it. The tcl environment would then load it into the runtime using the "load" command (usually handled by the packet manager, hence you see the "package require udp" command in the beginning of the example scripts).
To install it yourself, you'd most likely have to place the generated library file within your home directory. You would also need a standard compiling environment, including the tcl libraries (including the "devel" parts). _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|