View Single Post
Old 06-04-2004, 08:39 AM  
rage2001
Junior Member
 
Join Date: Oct 2003
Posts: 20
Default

Neo, I took your advice and did what you said, but I have a problem.... I used dzsbot to do this but it is not working, the bot spits back to me that the BNC is ALWAYS down... even if the site is up or down... This is the exact code i copied from the latest dzsbot in the scripts page.... Notice anything wrong?

set sitename "blah"
set cmdpre "!"

# SETUP THIS ONLY IF YOU HAVE BNC for your SERVER
set bnc(LIST) "IP:PORT"
set bnc(USER) "ioTest"
set bnc(PASS) "test"
set bnc(TIMEOUT) 3

set announce(BNC) "-%sitename- \[%section\] + %host - %status %speed"

set binary(NCFTPLS) "D:/ioFTPD/sitebot/ncftpls.exe"

set disable(NCFTPLS) 0

# set the blowfish encrytion key (empty = no encryption)
set blfs(KEY) ""

# set the blowfish header tag
set blfs(HEADER) "mcps"

set procs {
${cmdpre}bnc:proc_bnc
}

bind pub -|- [set cmdpre]bnc proc_bnc

################################################## #######
# SEND TO 1 CHANNEL #
################################################## #######
proc sndchan {puttype chan args} {
global splitter blfs
foreach line [split [lindex $args 0] $splitter(CHAR)] {
if { $blfs(KEY) != "" } {
set eline [encrypt $blfs(KEY) $line]
$puttype "PRIVMSG $chan :$blfs(HEADER) $eline"
} else {$puttype "PRIVMSG $chan :$line"}
}
}

################################################## #######
# SHOW BNC LIST using NCFTPLS exe #
################################################## #######
proc proc_bnc { nick uhost hand chan arg } {
global bnc announce binary disable
if { $disable(NCFTPLS) == 0 } {
foreach eachbnc $bnc(LIST) {
if {$eachbnc == ""} {continue}
set output $announce(BNC)
set now1 [clock clicks -milliseconds]
set status [catch { exec -- $binary(NCFTPLS) -u $bnc(USER) -p $bnc(PASS) -t $bnc(TIMEOUT) -r 00 ftp://$eachbnc } result]
set now2 "Response time: %bold[expr ([clock clicks -milliseconds] - $now1)]%boldms"
if { ([regexp \[.\]*ncftpls\:\ cannot\ open\[.\]* $result] > 0) } { set bncchk "DOWN" ; set bncspeed "" } else { set bncchk "UP" ; set bncspeed $now2 }
set output [replacevar $output "%host" $eachbnc]
set output [replacevar $output "%status" $bncchk]
set output [replacevar $output "%speed" $bncspeed]
set output [basicreplace $output "BNC"]
sndchan "puthelp" $chan $output
}
}
}
rage2001 is offline   Reply With Quote