PDA

View Full Version : [GENERAL] Need to understand the way NEWDIR: works


scoonydeus
10-01-2005, 10:24 AM
Hi,

I'm using:
ioFTPD version: 5-8-5r
ioBanana version: 2 (release 1)
and ioA ( the latest )

So, i'm trying to add extra functions to your wonderfull script, i undestand mainly the way it works. BUT...
I'm trying to catch the lines in the bot for the new release annoucement.

As far as i understand the script, the ioFTPD log everything in the ioFTPD.log, the bot search in this file for the "NEWDIR:" sequence to get Release Name and name of the poster, so it can set it as variable %pf and %user, %pf as Path... Hope i'm right.

So the bot send those variables to the ioB2.skin to get the skin and announce it.

I just need to know which part of the script search in the log to get thoses values and send them for the announce.

If someone can tell me that exactly...

Thanks all of you for your support.

Harm
10-01-2005, 12:11 PM
First, the routine that reads ioFTPD.log is the ioB:readiolog proc. This one reads every line added to ioFTPD.log and decides what to do with it.

Then, if the line corresponds to something that should be announced, it is sent to the ioB: parse proc (don't mind the space between the colon and the end of the proc name, it's to avoid the smiley). This one uses the skin file (which doesn't do anything by itself) and the $variables array to produce a human-readable announce.

Finally, the ioB:tsend proc is called to send the message to the correct channel.


The NEWDIR and DELDIR announces are a bit harder to use than the others because they're logged by ioFTPD itself and not ioBanana. ioBanana logs exactly what the bot needs.
Don't hesitate to ask for more details or how other functions are working.