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.

[Request] Folder (action)List Script

Old posts that have not been replied to for several years.
Locked
f
fuzzles
Voice
Posts: 4
Joined: Sat Aug 13, 2005 12:08 am

[Request] Folder (action)List Script

Post by fuzzles »

Hi,

I wanted to know if it is possible to code a script that can do the following things :

1. Paste changes done in one folder into a Channel [just directorys created/removed] [possible with an option to log files created/removed]inclusive Date and Time.
2. Create a "log"file with every action logged.
3. possible a .sfv checker.

thanks for any help or information.

ps: sorry for my bad english.
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

oh c'mon, there must be like a billion warez sitebot scrits out there already.
google is your friend.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

that's something which should be integrated in your dcc/ftp/warez/whatever-serve script/bot, so kindly redirect your request to its author(s)
f
fuzzles
Voice
Posts: 4
Joined: Sat Aug 13, 2005 12:08 am

Post by fuzzles »

Sorry but i'm not into stuff like Warez, i dont want something that checks ftps or whatever, just check a local directory for a new dir an paste it into a channel.

So i just wanted some hints or maybe some informations or code pieces.

cu
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

just curious, why would the users on your IRC channel want to know when a new directory is created in your shell account? i.e. what's the purpose of such script?
f
fuzzles
Voice
Posts: 4
Joined: Sat Aug 13, 2005 12:08 am

Post by fuzzles »

not other users, it is just for me, so a message/query would be ok too.

Im running serveral Webservers with daily Backups on a Remote Machine, they all get their own folders and archivs with sfv files [avoiding crc errors].
At the moment i recheck this with serveral mails a day, it works but it would be better ifthe output would be put into a chan or into a query/message [the only prob is the static nick here..]

cu
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

this will scan the specified directory every minute for created/removed dirs, report those to you and log to bot's main logfile

Code: Select all

set you yournick
set dir /home/you/www
bind time - * foo
proc foo {m h d mo y} {
   global bar dir you
   if ![info exists bar] {
      set bar [glob -dir $dir -types d -tails *]
   } else {
      set moo [glob -dir $dir -types d -tails *]
      foreach d $moo {
         if {[lsearch -exact $bar $d] == -1} {
            putserv "privmsg $you :created $d"
            putlog "created directory $d"
         }
      }
      foreach d $bar {
         if {[lsearch -exact $moo $d] == -1} {
            putserv "privmsg $you :removed $d"
            putlog "removed directory $d"
         }
      }
      set bar $moo
   }
}
f
fuzzles
Voice
Posts: 4
Joined: Sat Aug 13, 2005 12:08 am

Post by fuzzles »

Big thx for help :)
Locked