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.
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.
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?
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..]
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
}
}