I use the tcludp extension that can be found here:
http://www1.cs.columbia.edu/~xiaotaow/research/tcludp/
The command was successfully sent to the server (the game password changed), but the confirmation answer of the server was not received.
.rcon X.X.X.X 27960
-> sending rcon cmd
-> rcv
-> Tcl error [dcc:sock]: can not find channel named "sock19"
looks like the socket get's closed before I close it myself. Maybe this is the reason why i can't receive data? I don't know :/
Code: Select all
load /opt/tcl/lib/udp1.0.5/libudp1.0.5.so
bind dcc n| rcon dcc:sock
proc udp_read {socket} {
putlog "rcv"
while {[gets $socket line] >= 0} {
putlog "$line"
}
close $socket
}
proc dcc:sock {hand idx text} {
if {[llength $text] < 2} {
putdcc $idx "Usage: sock <ip> <port>"
return
}
set host [lindex $text 0]
set port [lindex $text 1]
set s [udp_open]
udp_conf $s $host $port
puts $s "ÿÿÿÿrcon rconpassword g_password test"
putdcc $idx "sending rcon cmd"
fconfigure $s -buffering full -translation auto
fileevent $s readable [udp_read $s]
}