| View previous topic :: View next topic |
| Author |
Message |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Thu Aug 10, 2006 4:20 am Post subject: Script Help Please |
|
|
Could someone help me find out why this not working please.
| Code: | 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 |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Aug 10, 2006 8:00 am Post subject: |
|
|
try this:
| Code: | 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 |
|
| Back to top |
|
 |
Cletus Voice
Joined: 06 Aug 2006 Posts: 19
|
Posted: Thu Aug 10, 2006 11:55 am Post subject: |
|
|
This is better suited to the scripting help board isn't it? Oh well.  |
|
| Back to top |
|
 |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Thu Aug 10, 2006 12:17 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Aug 10, 2006 8:13 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
|