egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script Help Please

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
whittinghamj
Op


Joined: 21 May 2006
Posts: 103

PostPosted: Thu Aug 10, 2006 4:20 am    Post subject: Script Help Please Reply with quote

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 Very Happy

Cheers
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Aug 10, 2006 8:00 am    Post subject: Reply with quote

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
View user's profile Send private message
Cletus
Voice


Joined: 06 Aug 2006
Posts: 19

PostPosted: Thu Aug 10, 2006 11:55 am    Post subject: Reply with quote

This is better suited to the scripting help board isn't it? Oh well. Smile
Back to top
View user's profile Send private message
whittinghamj
Op


Joined: 21 May 2006
Posts: 103

PostPosted: Thu Aug 10, 2006 12:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Aug 10, 2006 8:13 pm    Post subject: Reply with quote

Cletus wrote:
This is better suited to the scripting help board isn't it? Oh well. Smile

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber