TCL webstats module - connection problems
Posted: Sun Feb 13, 2005 8:38 am
I have been trying to make a TCL module for UnrealIRCD that outputs stats to a webpage but in text only. Unfortunately, I have been unable to get the program to connect to the server due to ping timeouts and other connection problems. Since I have been trying to fix the connection problem, I haven't been working on the stats gathering or output part of the program, only the connection part. Does anyone know how i could improve/fix this code or exactly what is wrong with it. Remeber, this is a statndalone program, meant to be executed using the wish interpereter.The server that is being linked to says this
Code: Select all
## UnrealIRCD linking test ##
set server "10.0.10.37"
set port "7029"
set botnick "socktest"
set servername "sock.test"
set numeric 42
set serverdesc "Test socket server"
set domain "socktest.beta"
set botname "testsock"
set mychan "#SockeTCL"
set password "testsocket"
set sockchan [socket $server $port]
puts "Logging in..."
puts $sockchan "PROTOCTL VL"
puts $sockchan "PASS :$password"
puts $sockchan "SERVER $servername 1 :U0-*-$numeric $serverdesc"
set loopy 1
while {$loopy<4} {
gets $sockchan raw
set isping [lindex [split $raw] 1]
if {$isping == "PING"} {
set pingreply [lindex [split $raw] end]
puts $sockchan ":PONG $pingreply"
}
if {$isping == "ERROR"} {
puts "$isping"
puts "Error connecting, aborting"
} else {
puts "$raw"
}
incr loopy 1
}
puts "Introducing pseudoclient: $botnick..."
puts $sockchan "NICK $botnick 1 1077205492 $botnick $domain $servername 0 +oiSq $domain :$botname"
puts "Joining channel..."
puts $sockchan ":$botnick JOIN $mychan"
The IRCD is located on the computer with the IP address 10.0.10.37 and the program I am developing is being executed on 10.0.10.34. Any ideas?--- *** Notice -- (link) Link Ph34rful.ImmorTalZ.org -> sock.test[@0:0:0:0:0:ffff:10.0.10.34.39052] established
--- *** Global -- Closing link: Write error: Connection reset by peer - sock.test[10.0.10.34]