View Full Version : [Filled] Stand-alone BNC Test
rage2001
06-03-2004, 02:31 PM
All I want is to load a tcl file in my eggdrop to respond to !bnc , and to see if a bnc is up or not... Thjis is a different site then the other one i was working on.. anyone got an idea?
rage
neoxed
06-03-2004, 03:52 PM
Just copy and paste the related BNC code from dZSbot or whatever sitebot you're currently using. Just use common sense, it's not that difficult to do.
rage2001
06-04-2004, 08:39 AM
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
}
}
}
neoxed
06-06-2004, 11:11 PM
Should be fine, although you're missing the "replacevar" procedure; might want to include it. ;)
You might want to add the ip address used by this eggdrop to the sitebot account as well.
rage2001
06-08-2004, 03:07 PM
Yeah, I needed to add the ip of my machine to the sitebot account to get the bnc test to work. i was just using 127.0.0.1 b4. Got it working now.
buffi
08-02-2004, 07:16 AM
Hi all,
I managed to get that script going on but only when the windrop is using the dszbot.tcl
since it wont post on the channel without it.
And off course that happened since i didnt have an announce channel configureed in the script. (how smart)
but i couldnt set it working.
I also looked at this scrip and he has the channel announce set, but i did not see in it any place to put in the announce channel.
Can anybody help me get the command that i will be able to set in a channel and that the bot will post all the bnc's on private pm when typed !bnc
Thanks
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.