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.
Help for those learning Tcl or writing their own scripts.
emoD
Voice
Posts: 5 Joined: Mon Mar 17, 2008 10:02 am
Post
by emoD » Mon Mar 17, 2008 10:21 am
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...
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Mon Mar 17, 2008 10:31 am
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
emoD
Voice
Posts: 5 Joined: Mon Mar 17, 2008 10:02 am
Post
by emoD » Mon Mar 17, 2008 10:41 am
Do You Know Basic UDP Module With Those Functions I Meant Before
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Mon Mar 17, 2008 11:00 am
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
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Mon Mar 17, 2008 11:01 am
Have you ever read "The Manual"?
emoD
Voice
Posts: 5 Joined: Mon Mar 17, 2008 10:02 am
Post
by emoD » Mon Mar 17, 2008 11:31 am
I Can't Find Usage On Windrop.
1. I Can't Load udp108.dll
2. I Can't Load Any Extra Module On Windrop!
DragnLord
Owner
Posts: 711 Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA
Post
by DragnLord » Mon Mar 17, 2008 12:06 pm
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 .
ultralord
Master
Posts: 255 Joined: Mon Nov 06, 2006 6:52 pm
Post
by ultralord » Wed Jul 02, 2008 3:20 am
i found this.. but doenst working.. if someone fix it.. i need this too
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
}
}
}