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.

UDP Sockets

Help for those learning Tcl or writing their own scripts.
Post Reply
e
emoD
Voice
Posts: 5
Joined: Mon Mar 17, 2008 10:02 am

UDP Sockets

Post by emoD »

Hello,

I Have Problem. Searched Google, Looked At Manuals And At Scripts.

I Can't Find Clear Explanation Of UDP Sockets, Like:
1. How I Can Open It. (Found I Think 'udp_open')
2. How I Can Send Data To Socket.
3. How I Can Get Data From Socket.
4. Close Socket. (Found I Think 'close')

This Functions Will Be Used To Communicate With CS Server.
I Know You Suggest To Use Module Like RCON.
But I Need To Open Sockets Without Modules And Communicate.

Script Usage:
Do Restart To Server.
Change Password.
Change Map.
And Others...
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Tcl does not provide access to udp-sockets, so you'll have to go for writing either a tcl or an eggdrop module.
NML_375
e
emoD
Voice
Posts: 5
Joined: Mon Mar 17, 2008 10:02 am

Post by emoD »

Do You Know Basic UDP Module With Those Functions I Meant Before
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

The Tcl UDP extension available at sourceforge might be an option, although I haven't tried it myself.

Reading from it's docs however, it seems to support most common options and flags, and presents it to tcl as an open file descriptor (like open and socket).

You'll find it at http://tcludp.sourceforge.net/
NML_375
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Have you ever read "The Manual"?
e
emoD
Voice
Posts: 5
Joined: Mon Mar 17, 2008 10:02 am

Post by emoD »

I Can't Find Usage On Windrop.

1. I Can't Load udp108.dll
2. I Can't Load Any Extra Module On Windrop!
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

emoD wrote:I Can't Find Usage On Windrop.

1. I Can't Load udp108.dll
2. I Can't Load Any Extra Module On Windrop!
These forums deal mostly with TCL usage on standard eggdrop. For windrop I suggest posting on their forum.
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

i found this.. but doenst working.. if someone fix it.. i need this too :P

Code: Select all

proc srv_cmd1 {n u h c t} {
global lastbind chan rcon_path rcon_password rcon_address rcon_port rcon_path2 rcon_password2 rcon_address2 rcon_port2
	if { [string tolower $c] == $chan || $chan == "" } {
				if { $lastbind == "!pass-1" } {
			set cmd "sv_password $t"
			do_rcon1 $c $cmd
		}
  if { $lastbind == "!pass-3" } {
                        set cmd "sv_password $t"
                        do_rcon3 $c $cmd
                }
if { $lastbind == "!pass-5" } {
                        set cmd "sv_password $t"
                        do_rcon5 $c $cmd
                }
 if { $lastbind == "!pass-6" } {
                        set cmd "sv_password $t"
                        do_rcon6 $c $cmd
                }

if { $lastbind == "!pass-4" } {
                        set cmd "sv_password $t"
                        do_rcon4 $c $cmd
                }

		if { $lastbind == "!pass-2" } {
			set cmd "sv_password $t"
			do_rcon2 $c $cmd
		}
		}
}
Post Reply