in reply to Message Board Mangling

Most sane strategies would have you being in control of the original writing of the file. Then you could use a db, or whatever. I'm guessing this is a hotline server news file or the like so you can't do that.

What you can do though is control when you yourself post. If you are on unix flock wouldn't necessarily stop the server from writing to it, but changing permissions might (if it doesn't crash the server). I believe flock on Windows stops all programs from writing to a flocked file but I haven't tried it myself. Anyway lock the file somehow, record the length of the file and the length of your submission, and so on.

You should be able to maintain a file with a list of byte offsets of your own submissions which you could later snip out. If you can't lock maybe you just want to post when the server is down, or something. Maybe you reboot it daily and you can have a script which adds your latest submission to the file at that time.

Otherwise if you just do pattern matching and don't filter other people's submissions they will always be able to fool it.

Replies are listed 'Best First'.
Re: Re: Message Board Mangling
by Anonymous Monk on Jul 18, 2001 at 07:03 UTC
    Replying late, but, them fooling it is quite alright. Most people aren't going to post song lyrics and mark them archive. I just need to keep the news clean, and having people concious of just what it is that they are posting keeps stuff sane.