. _ ______ | | ___ __ _|__ (_)_ __ _ __ ___ _ __ | | / _ \ / _` | / /| | '_ \| '_ \ / _ \ '__| | |__| (_) | (_| |/ /_| | |_) | |_) | __/ | |_____\___/ \__, /____|_| .__/| .__/ \___|_| |___/ |_| |_| 2.0 by Baerchen, May 2001 for eggdrop 1.4.x+ baerchen@germany-chat.net DESCRIPTION ********************************************************************** LogZipper takes care of all your log files. It might be useful if you have a disc-quota or if your bot logs a lot of channels. LogZipper zips all ".yesterday" (or ".${logfile-suffix}") logfiles it can find in a given directory, adds yesterday's date to the filename and deletes the original log. The zipped log can then be mailed to various recipients (as an attachment, of course ;-)) If you decide that keeping logs for more than x days is not necessary, LogZipper compares their last modification dates (mtime) to the current date and deletes all zips which age _exceed_ x days. CONFIGURATION ********************************************************************** set lz(logloc) "logs/" lz(logloc) is the relative path of the directory where you keep the logfiles. Leave trailing / as is. set lz(duration) 2 lz(duration) is the amount of days you want to keep the zipped logs. Every day, the logs which age exceeds lz(duration) days, will be deleted. Set to 0 in order to never delete any log. set lz(sendlogs) 0 lz(sendlogs) determines whether you want to have the bot send any of the zipped logs to someone. 0 = don't, 1 = yes, please set lz_recipient(1) "user@mail log1.log #channel1.log #channel2.log" Here's the difficult part of this script. Logzipper needs to know what user shall receive which logs. Therefore, within the quotes of the variable, you type the email adress of the receiver in the first position. here: user@mail In the second, third, fourth, nth position, you assign _all_ logs the user shall receive - just use the same filenames as you have defined in the bot config file. That's the first part. Now, you might want to send logs to more than one user. Notice the "1" right after lz_recipients. For the next person to receive the same or other logs, copy the whole line and replace the 1 by a 2, e.g.: set lz_recipient(2) "user2@anothermail log1.log log4.log" Repeat this until all recipients are determined. Have fun