Looking/request for a script that can show in mainshat a short message then someone adds anything new to the ftp/site.
Like this...
<-BOT-> -[Dump]Nickname ---> Movie.2004.SVCD.DVDRiP-GROUP
This should work ioFTPDs ftpserver....
I searched but didnt find anything so I hope someone can help me
// Robban
please be more specific about this... what you ecxactly wanna do? if you upload a file, it notes it and puts 2 list or notifies? or want a simple release bot?
if i understand you correctly, then this is what you need:
-- Make a file called releases.txt in \Scripts Folder
-- Made By Optimus
sBot = "botnamehere"
timedate = date()
file = "releases.txt"
display1 = "Item"
display2 = "Description"
display3 = "Item"
function Main()
frmHub:RegBot(sBot)
end
function DataArrival(user, data)
if (strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
_,_,cmd=strfind(data, "%b<>%s+(%S+)")
if (cmd=="!read") then
ReadRelease(user, data, cmd)
return 1
elseif (cmd=="!write") then
if user.bOperator or user.iProfile == 2 then
s,e,cmd,release,desc = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)" )
if desc == nil then
description = "No "..display2.." specified!"
s,e,cmd,release = strfind( data, "%b<>%s+(%S+)%s+(%S+)" )
else
description = desc
end
if release == nil then
user:SendData(sBot, "*** No "..display1.." specified!")
return 1
end
News("By: "..user.sName.."\t At: "..timedate.."\r\n"..display1..": "..release.."\r\n"..display2..": "..description.."\r\n")
SendToAll(sBot, "New "..display3.." Added....By <"..user.sName.."> Type !read in Main-Chat to show "..display1..".")
return 1
else
user:SendData(sBot, "*** !write is only availible to [VIP] and above!")
return 1
end
end
end
end
function ReadRelease(user, data, cmd)
local release = ""
readfrom(file)
while 1 do
local line = read()
if (line == nil) then
break
else
release = release.." "..line.."\r\n"
end
end
user:SendPM(sBot, "\r\n\r\n".." "..display3.."s posted by users: ".."\r\n\r\n"..release)
readfrom()
end
function News(what)
appendto(file)
write(what.."\n")
writeto()
end
but what does ptokax and lua got to do with ftp stuff anyway?
More specific... hmm :) Lets say it should only display text in mainchat.
[Dump]Nickname is sharing stuff in the hub like a ordenary user. So then someone starts a transfer to the dumps ftp the .lua script will notice this and puts a little message in the mainchat so everyone see it.
It should not be any triggers whit this script... I will only work whit ioFTPD and ads upload stats for new files.
I cant understand a thing from you... :( Do you want to take a file from user and put it onto a ftp,??? what does ptokaX got to do with ftp anyway???
QuoteOriginally posted by Robban
More specific... hmm :) Lets say it should only display text in mainchat.
[Dump]Nickname is sharing stuff in the hub like a ordenary user. So then someone starts a transfer to the dumps ftp the .lua script will notice this and puts a little message in the mainchat so everyone see it.
It should not be any triggers whit this script... I will only work whit ioFTPD and ads upload stats for new files.
this at least assumes that ioftpd is on the server running the hub, which is not a fortunate thing, only if its a very big server in b/w. Would be very hard to do, but if ioftpd can send some info thru internet hmm its possible but not recommended.
better add this 2 freshstzuff, as if some1 starts an upload, it means that he is not AFK :D
I got a user on my dchub. This user share stuff from a ftp.
Then someone uploads e.i a movie to his ftp a -BOT- will show in mainchat that someone is uploading a movie to the ftp. e.i like this
Any new stuff on -[Dump]Nickname ?
<-BOT-> -[Dump]Nickname -> New Stuff Added-> Movie.2004.SVCD.DVDRiP-GROUP
Cool someone uploads a new movie on the dump.
Maybe it would be easier if I fix a html based adder and you can fix a script that would do the same thing as I request but takes the stats from the webpage?
Then something is added to the page in news this will be notice in the mainchat on the hub like this
<-BOT-> -[Dump]Nickname -> New Stuff Added-> Movie.2004.SVCD.DVDRiP-GROUP
QuoteOriginally posted by Robban
I got a user on my dchub. This user share stuff from a ftp.
Then someone uploads e.i a movie to his ftp a -BOT- will show in mainchat that someone is uploading a movie to the ftp. e.i like this
Any new stuff on -[Dump]Nickname ?
<-BOT-> -[Dump]Nickname -> New Stuff Added-> Movie.2004.SVCD.DVDRiP-GROUP
Cool someone uploads a new movie on the dump.
Maybe it would be easier if I fix a html based adder and you can fix a script that would do the same thing as I request but takes the stats from the webpage?
Then something is added to the page in news this will be notice in the mainchat on the hub like this
<-BOT-> -[Dump]Nickname -> New Stuff Added-> Movie.2004.SVCD.DVDRiP-GROUP
then it checks for update periodically on the webstats page? This is something now...
Yes it will check the webpage periodically. whith a 10min interval. Then it find something new it will notice this in maninchat in hub.
I have to find a htmlscript for this first :)
Hmm could this work? Make a script working trought a ftpserver on another computer? That can login to the server and take stats from a txtfile?
It's taking stats directly from the logfile for ioFTPD. The script should take stats from first NEWDIR: line and notice in channel. ONLY the release name.
NEWDIR: also logg folders like cd1, cd2 and so on. This should be skipped.
It should skip folders like "cd1" "cd2" "cd3" "cd4" "cd5" "cd6" "cd7" "cd8" "cd9" "disc1" "disc2" "disc3" "extra" "covers" "vobsubs" "samples" "sample" "vobsubs" "vobsub" "subtitles" "subtitle" "subs" "subpack" "codec"
It should take this....
09-09-2004 11:58:33 NEWDIR: "ioFTPD" "ioftpd" "/UPLOAD/Movie.2004.SVCD.DVDRiP-GROUP" "D:\UPLOAD\Movie.2004.SVCD.DVDRiP-GROUP"
And only show this in mainchat...
<-BOT-> -[Dump]Nickname -> New Stuff Added-> Movie.2004.SVCD.DVDRiP-GROUP
It should skip this...
09-09-2004 11:58:34 NEWDIR: "ioFTPD" "ioftpd" "/UPLOAD/Movie.2004.SVCD.DVDRiP-GROUP/Sample" "D:\UPLOAD\Movie.2004.SVCD.DVDRiP-GROUP\Sample"
Then someone adds a new release, .txt file will be uppdated. .lua script will notice this and show this to the mainchat like this.
<-BOT-> -[Dump]Nickname -> New Stuff Added-> Movie.2004.SVCD.DVDRiP-GROUP
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
Or maybe this work...
I have another ide for this... Would it be easier to make a script that check users share for new stuff (folders)?
Like it first scan the user for all folders and add this to a list.txt. Then after 10min it checks it again and if it find any new stuff (Folders) it will notice this in mainchat whit
<-BOT-> Nickname --> New Stuff Added --> Movie.2004.SVCD.DVDRiP-GROUP
And add it to list.txt. Then start over again. This maybe work if the script downloads a specific users filelist (Nickname.xml.bz2) and then save all folders in it. Then if it finds a new folder it will notice this in mainchat.
None? Can this be done or not?
Thx for replay. Take the time you need :) And thx for understanding me :)
QuoteIf I understand your request, you want it to be announced in the hub when some uploads a file to the ftp.
Tell me if you need some type of files from the ioFTPD server. For easier work
All stuff ioFTPD loggs is logged to a .txt file. And then someone uploads something new the textfile will be uppdated direct and the line will look like this in the logg.
09-09-2004 11:58:33 NEWDIR: "ioFTPD" "ioftpd" "/UPLOAD/Movie.2004.SVCD.DVDRiP-GROUP" "D:\UPLOAD\Movie.2004.SVCD.DVDRiP-GROUP"
It would be cool if you get it work like this to
<-BOT-> -[Dump]Nickname --> [UPLOADFOLDER] - Releasename
i.e
<-BOT-> -[Dump]Nickname --> [MP3] -Musik.2003-BLA
<-BOT-> -[Dump]Nickname --> [GAMES] - Game.2003-BLA
// Robban
I have found a better .txt file and it shows the users name yes :)
Here is a short sample of the .txt logfile. ioFTPD is the users name
04-10-06 01:28:17 [ioFTPD] /UPLOAD/The.Sims.2.Virtual.NoCD.Plus.Nude.Patch.Build.Fixed-Sheldon/sims2pbf.sfv @ 2kpbs
04-10-06 01:28:17 [ioFTPD] /UPLOAD/The.Sims.2.Virtual.NoCD.Plus.Nude.Patch.Build.Fixed-Sheldon/sheldon.nfo @ 123kpbs
04-10-06 01:28:18 [ioFTPD] /UPLOAD/The.Sims.2.Virtual.NoCD.Plus.Nude.Patch.Build.Fixed-Sheldon/sims2pbf.rar @ 19663kpbs
04-10-06 01:31:14 [ioFTPD] /UPLOAD/XBMC.2004.0913-EXPERT/XBMC.2004.0913-EXPERT.sfv @ 7kpbs
04-10-06 01:31:14 [ioFTPD] /UPLOAD/XBMC.2004.0913-EXPERT/XBMC.2004.0913-EXPERT.nfo @ 1092kpbs
04-10-06 01:31:16 [ioFTPD] /UPLOAD/XBMC.2004.0913-EXPERT/XBMC.2004.0913-EXPERT.rar @ 15422kpbs
Maybe take the info for the user and make it look like this
BOT - USER - FOLDER - RELEASENAME
<-BOT-> [ioFTPD]-[UPLOAD]-[XBMC.2004.0913-EXPERT]
it should be done by webstats i still say, or by periodically getting the users ioftpd log, otherwise the ftp should be on the server