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.

Ftp Online

Old posts that have not been replied to for several years.
C
CyberGhosT
Voice
Posts: 13
Joined: Thu Nov 20, 2003 5:19 pm

Ftp Online

Post by CyberGhosT »

I nead a script that shows whos ftp is online can eny1 help me whit that

I dont know if its posibul to make :)
CyberGhosT
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

A forum search would help.
C
CyberGhosT
Voice
Posts: 13
Joined: Thu Nov 20, 2003 5:19 pm

Ftp Online

Post by CyberGhosT »

i found this scrip on the forum but i cant make it work
when i restart or rehash the bot it dont show eny error
what can be wrong ? Help me im new at this tcl scripting


package require ftp

bind pub - .ftp ftp


proc ftp { nick uhost hand chan arg } {
ftp1 $nick $uhost $hand $chan $arg
ftp2 $nick $uhost $hand $chan $arg
ftp3 $nick $uhost $hand $chan $arg
ftp4 $nick $uhost $hand $chan $arg
}


proc ftp1 { nick uhost hand chan arg } {

set biglist1 {xxx.xxx.xxx.xxx log pas}
foreach {addr uid pwd} $biglist1 {
set statval [ftp::Open $addr $uid $pwd -port 444]
if {$statval<0} {
putserv "PRIVMSG $chan : \002FTP 1\002 \0034down\0034!"
} else {
putserv "PRIVMSG $chan : \002FTP 1\002 \0039up\0039!"
ftp::Close $statval;
}
}
}

proc ftp2 { nick uhost hand chan arg } {

set biglist2 {xxx.xxx.xxx.xxx log pas}
foreach {addr uid pwd} $biglist2 {
set statval [ftp::Open $addr $uid $pwd -port 444]
if {$statval<0} {
putserv "PRIVMSG $chan : \002FTP 2\002 \0034down\0034!"
} else {
putserv "PRIVMSG $chan : \002FTP 2\002 \0039up\0039!"
ftp::Close $statval;
}
}
}

proc ftp3 { nick uhost hand chan arg } {

set biglist3 {xxx.xxx.xxx.xxx log pas}
foreach {addr uid pwd} $biglist3 {
set statval [ftp::Open $addr $uid $pwd -port 444]
if {$statval<0} {
putserv "PRIVMSG $chan : \002FTP 3\002 \0034down\0034!"
} else {
putserv "PRIVMSG $chan : \002FTP 3\002 \0039up\0039!"
ftp::Close $statval;
}
}
}

proc ftp4 { nick uhost hand chan arg } {

set biglist4 {xxx.xxx.xxx.xxx log pas}
foreach {addr uid pwd} $biglist4 {
set statval [ftp::Open $addr $uid $pwd -port 444]
if {$statval<0} {
putserv "PRIVMSG $chan : \002FTP 4\002 \0034:(\0034"
} else {
putserv "PRIVMSG $chan : \002FTP 4\002 \0039:)\0039"
ftp::Close $statval;
}
}
}

putlog "Loaded ftp_test.tcl by DigitalXXL"
CyberGhosT
User avatar
Aron
Halfop
Posts: 86
Joined: Sat Mar 15, 2003 8:35 am

Post by Aron »

You DID fill in your ftp's address in the $biglist variables, right?
The best way to start learning is to start helping.
C
CyberGhosT
Voice
Posts: 13
Joined: Thu Nov 20, 2003 5:19 pm

Ftp Online

Post by CyberGhosT »

yes i did fill in ftp's address

wonder if i must use somthing els with that tcl script??
CyberGhosT
User avatar
Aron
Halfop
Posts: 86
Joined: Sat Mar 15, 2003 8:35 am

Post by Aron »

So it does not show any error at all?

Are you sure the script is loading? Did you enter the source line in your bot's config?
The best way to start learning is to start helping.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You didn't continue reading that post.

User replied:

Code: Select all

package require ftp 
bind pub - .ftp ftps 

proc ftps {nick uhost hand chan arg} { 
   set out {} 
   # just add your ftps to this list (make sure you don't 
   # leave any fields blank or mess up the order :P) 
   set list { 
      {"FTP 1" ftp.addr1.cum 444 login pass} 
      {"FTP 2" ftp.addr2.cum 21 login pass} 
      {"FTP 3" ftp.addr3.cum 3131 login pass} 
      {"FTP 4" ftp.addr4.cum 9999 login pass} 
   } 
   foreach ftp $list { 
      foreach {name addr port user pass} $ftp break 
      set ftp [ftp::Open $addr $user $pass -port $port] 
      if {$ftp<0} { 
         lappend out "$name is down" 
      } { 
         lappend out "$name is up" 
      } 
      ftp::Close $ftp 
   } 
   putserv "TOPIC $chan :[join $out " | "]" 
}
use it.
C
CyberGhosT
Voice
Posts: 13
Joined: Thu Nov 20, 2003 5:19 pm

Post by CyberGhosT »

Yes im sure the script is loading

Sir_Fz ivd tryd that script to but it dont work that to


wonder if i must use somthing els with that tcl script??
CyberGhosT
C
CyberGhosT
Voice
Posts: 13
Joined: Thu Nov 20, 2003 5:19 pm

Ftp Online

Post by CyberGhosT »

Must i add somthing in the ftp prog to make it work ?

sorry ppl im new at this scripting....
CyberGhosT
C
CyberGhosT
Voice
Posts: 13
Joined: Thu Nov 20, 2003 5:19 pm

Ftp Online

Post by CyberGhosT »

some1 who whant to help me???
CyberGhosT
3
3zzy
Halfop
Posts: 42
Joined: Sun Sep 14, 2003 6:58 am

Post by 3zzy »

What about a script that would check if any ftp is online using !ftp [address] [port] ?
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

sorry read wrong :p take back my words :p
XplaiN but think of me as stupid
C
CyberGhosT
Voice
Posts: 13
Joined: Thu Nov 20, 2003 5:19 pm

FTP Online

Post by CyberGhosT »

Can some 1 tell me what this mean package require ftp
and wher i can get it.

Cant seam to make this script to work..

Code: Select all

package require ftp 
bind pub - .ftp ftps 

proc ftps {nick uhost hand chan arg} { 
   set out {} 
   # just add your ftps to this list (make sure you don't 
   # leave any fields blank or mess up the order :P) 
   set list { 
      {"FTP 1" ftp.addr1.cum 444 login pass} 
      {"FTP 2" ftp.addr2.cum 21 login pass} 
      {"FTP 3" ftp.addr3.cum 3131 login pass} 
      {"FTP 4" ftp.addr4.cum 9999 login pass} 
   } 
   foreach ftp $list { 
      foreach {name addr port user pass} $ftp break 
      set ftp [ftp::Open $addr $user $pass -port $port] 
      if {$ftp<0} { 
         lappend out "$name is down" 
      } { 
         lappend out "$name is up" 
      } 
      ftp::Close $ftp 
   } 
   putserv "TOPIC $chan :[join $out " | "]" 
}

it would be nice if some1 can help me whit this thx
CyberGhosT
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

That means it requires the ftp package. As far as I know, it's part of the tcllib collection (tcllib.sf.net for more info).
C
CyberGhosT
Voice
Posts: 13
Joined: Thu Nov 20, 2003 5:19 pm

FTP Online

Post by CyberGhosT »

cant some1 make a tcl script like this 1 without the package require ftp ?
CyberGhosT
Locked