Re: [CODE][LONG] look_at_target from the dynamic boards patch (against stock+oasis)

From: Patrick J. Dughi (dughi@IMAXX.NET)
Date: 03/09/98


> I have worked for 24 hours (nearly 16 straight on this one thing) and
> have
> thoroughly worn out my brain.
                >code snipped<

        Though I did post a fix for that, I didn't actually add an update
to the board code - it was a simple thing.  Here's what you can do
(generalized). Otherwise, search back about 3-4 weeks. There should be
a couple of posts - search for "Dynamic" "board" and "bug" and you should
find something interesting.

        backup=str_dup(argument)

       down where the argument is recreated, remove all the crap thats
down there and just send "backup" instead of the recreated argument. And
then free backup when you're done.

        Another interesing one I hadn't even noticed.  Read board works
correctly, but look board, or look at board does not - it will not scroll
past a page (usually 19 messages).  This fix is left to the reader as a
brief exercise in hunting simple bugs.

        Oh, and one more thing I added in at the bequest of certain
parties... if the mud crashes while a person is mid-way through olcing a
board, the object is never created, while the board file is.  Since I
didn't put any checking to see if the object existed (supposedly, it
pretty much had to the way I had it - unless you broke something..), it
crashes when it tries to load up the board.  You can see the board number
really easy in a back trace, so  you can just erase it or something, but
here's what else you might want to do - add a check to see if the
load_object or whatever is called retruns success, or not.  If it
doesn't , i'd just as soon automatically unlink the file (and log that
fact).

                (So much for the bug-free version)

                                                PjD


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST