This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
whittinghamj
Op
Posts: 103 Joined: Sun May 21, 2006 4:50 pm
Post
by whittinghamj » Thu Aug 10, 2006 4:20 am
Could someone help me find out why this not working please.
Code: Select all
bind pub o !ftptest ftp:test
proc ftp:test {n u h c a} {
set port [lindex $text 2]
if {[catch {set ftp_test [socket -async $a $port]} sockerr]} {
putserv "privmsg $c :$a is 4OffLine"
} else {
putserv "privmsg $c :$a is 9OnLine"
}
close $ftp_test
}
I am trying to have the dcript do the following
!ftptest host port
<bot> host is online
or
host is offline.
Could someone help me out on this one please
Cheers
DragnLord
Owner
Posts: 711 Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA
Post
by DragnLord » Thu Aug 10, 2006 8:00 am
try this:
Code: Select all
bind pub o !ftptest ftp:test
proc ftp:test {n u h c a} {
if {[catch {set ftp_test [socket -async $a]} sockerr]} {
putserv "privmsg $c :$a is 4OffLine"
} else {
putserv "privmsg $c :$a is 9OnLine"
}
close $ftp_test
}
should work for things like:
!ftptest ftp.some.host.net 6969
Cletus
Voice
Posts: 19 Joined: Sun Aug 06, 2006 6:01 pm
Post
by Cletus » Thu Aug 10, 2006 11:55 am
This is better suited to the scripting help board isn't it? Oh well.
whittinghamj
Op
Posts: 103 Joined: Sun May 21, 2006 4:50 pm
Post
by whittinghamj » Thu Aug 10, 2006 12:17 pm
hey drag,
That just returns offline all the time, there is no where to give the arg for the port eg !ftptest host port or !ftptest host:port
both return offline even tho I know that ftp is online.
any suggestions? cheers
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Thu Aug 10, 2006 8:13 pm
Cletus wrote: This is better suited to the scripting help board isn't it? Oh well.
After 67 posts you'd think the person posting would know.
Moved to : Scripting Help
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM