Heres what i done for my board.c file.

look for: send_to_char (BOLD GREEN "Your note so far:\n\r" NO_COLOR,ch);
and under it add:
/* string_edit */               string_append(
ch,&ch->pcdata->in_progress->text);

then look for: sprintf (buf, "This note will expire
%s\r",ctime(&ch->pcdata->in_progress->expire));

:under the write_to_buffer (d,buf,0);
put: string_append( ch,&ch->pcdata->in_progress->text );

then look for: /* 24 hours, 3600 seconds */
under the expire = put:
string_append( ch,&ch->pcdata->in_progress->text );

Then in same function after Desc and Write arguments put
        if ( argument[0] == '\0' )
                string_append( ch,&ch->pcdata->in_progress->text );

umm thats all there is to it. the only problem is that you will have to
use two tildas ~~ to exit our of the editor. i havent found a solution to
this yet. but if anyone has any bright ideas ill love to hear them :P
ohh also i dont know if this is in stock board or not but i have
ch->desc->connected = CON_NOTE_TEXT;
after everyone of the string_appends

hope this hack helps. it will just like you will be using the desc editors
in olc.
Chow kids!

On Mon, 25 Feb 2002, Jeremy Hill wrote:

> I guess I don't quite understand--it seems to be working okay as-is, do you
> think I ought to change it to be *ch?
>
> Relatedly, I've noticed that format_string was made for room descripts (duh)
> and strips out any blank lines.  I'm trying to modify it so if the buffer
> looks like \r\n (AKA a new line-- right?) it'll shove out \r\n instead of
> making it into ' '.  I think some people like paragraph breaks in their room
> descrips anywho.  Actually, in retrospect, I guess this won't work.. I need
> to make it \r\n\n.. or something.. *boggles*  What's a blank line look like?
> \r\n\r\n?
>
> Ah, how much easier it would be if it was HTML.
>
> Thanks again,
>
> Jeremy Hill
>
> ----- Original Message -----
> From: "Edwin Groothuis" <[EMAIL PROTECTED]>
> To: "Jeremy Hill" <[EMAIL PROTECTED]>
> Cc: <[email protected]>
> Sent: Monday, February 25, 2002 12:20 AM
> Subject: Re: Line formatting query
>
>
> > On Mon, Feb 25, 2002 at 12:11:32AM -0600, Jeremy Hill wrote:
> > > Greetings and salutations,
> > >   First time posting; have a quick question for you. I use Erwin's note
> > > board system.  I was going to make a note formatter
> > > for it, but then I noticed that OLC had a formatter built in, called
> > > format_string:
> > > char *format_string (char *oldstring)
> > >
> > > I figured I could kind of make use of this and use that instead of
> making my
> > > own line formatter, so this is what I did in
> > > void handle_con_note_finish (part of board.c):
> > >
> > > case 'o': /*format note*/
> > >     ch->pcdata->in_progress->text = format_string
> > > (ch->pcdata->in_progress->text);
> > >     write_to_buffer (d,"Note formatted.\n\r",0);
> > >     break;
> > >
> > > Now, here's my question-- some of the other calls to format_string use
> > > pointers, like
> > > *ch->desc->pString = format_string (*ch->desc->pString);
> > > while others do not, like
> > > pRoom->description = format_string (pRoom->description);
> >
> > if you check the defintion of the description field in the roomindexdata
> > struct, you see that it's a char *, so it is a pointer.
> > What you also can see in the definition of the pString field in the
> > descriptordata is that it's a char **, so a pointer to a pointer.
> >
> > So as long as the parameter for the format_string is a char *,
> > everything will go okay. But if it's different? Ooooh my god :-)
> >
> > Edwin
> >
> > --
> > Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
> > [EMAIL PROTECTED] |           Interested in MUDs? Visit Fatal Dimensions:
> > ------------------+                       http://www.FatalDimensions.org/
>
>
>


Reply via email to