Go Back   FlashFXP Forums > > > >

! Requests Need a script or some sort of cool .bat file ? Ask here!

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-03-2004, 02:31 PM   #1
rage2001
Junior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 20
Default [Filled] Stand-alone BNC Test

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
rage2001 is offline   Reply With Quote
Old 06-03-2004, 03:52 PM   #2
neoxed
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,326
Default

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.
neoxed is offline   Reply With Quote
Old 06-04-2004, 08:39 AM   #3
rage2001
Junior Member
ioFTPD Foundation User
 
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
Old 06-06-2004, 11:11 PM   #4
neoxed
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,326
Default

Should be fine, although you're missing the "replacevar" procedure; might want to include it.
neoxed is offline   Reply With Quote
Old 06-07-2004, 12:44 AM   #5
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

You might want to add the ip address used by this eggdrop to the sitebot account as well.
Harm is offline   Reply With Quote
Old 06-08-2004, 03:07 PM   #6
rage2001
Junior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 20
Default

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.
rage2001 is offline   Reply With Quote
Old 08-02-2004, 07:16 AM   #7
buffi
Junior Member
 
Join Date: Jul 2004
Posts: 18
Default

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
buffi is offline   Reply With Quote
Reply

Tags
bnc, idea, rage, site, thjis

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:28 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)