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 

Enabling use of UDP sockets

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


Joined: 29 Jan 2009
Posts: 5

PostPosted: Thu Sep 13, 2012 1:50 am    Post subject: Enabling use of UDP sockets Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Sep 13, 2012 2:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
na85
Voice


Joined: 29 Jan 2009
Posts: 5

PostPosted: Thu Sep 13, 2012 3:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Sep 13, 2012 3:35 pm    Post subject: Reply with quote

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