From: dennis@starlifter.reichel.net


Hi,

An imm wrote out a long penalty and addressed it to immortal, as well
as a couple of players.  He was disappointed it would not be seen
by those players unless it were also posted to notes, since I was
unwilling to give players access to the penalty spool :-)

This will forward message from one spool to another.  A suggested
implemtation is shown to address the above situation. 

Insert wherever, but suggest right below count_spool.

/* forward_spool, version 0
/* Released under Gnu FSF License terms, Dennis Reichel (c) 1997          */
/* Why Gnu?  Least restrictive license that encourages free distribution  */
/* Why a copyright and license at all?  I don't want to get sued some day */
/* for using my own code :-)                                              */

int forward_spool(CHAR_DATA *ch, NOTE_DATA *spoolfrom, NOTE_DATA *spoolto)
{
    int count = 0;
    NOTE_DATA *pNoteFrom, *pNoteTo, *spoolto_last;

    for (pNoteFrom = spoolfrom; pNoteFrom != NULL; 
                                 pNoteFrom = pNoteFrom->next)
        if ( is_name( ch->name, pNoteFrom->to_list ) && 
                                                 !hide_note(ch,pNoteFrom) )
	{
	    
	    
	    for ( spoolto_last = spoolto; spoolto_last->next ; )	    
	    {
	        spoolto_last = spoolto_last->next;
	    }

	    spoolto_last->next = pNoteTo = new_note();
	    pNoteTo->next	= NULL;
	    pNoteTo->sender	= str_dup( pNoteFrom->sender );
	    pNoteTo->date	= str_dup( pNoteFrom->date );
	    pNoteTo->date_stamp = current_time;
	    pNoteTo->to_list	= str_dup( ch->name );
	    pNoteTo->subject	= str_dup( pNoteFrom->subject );
	    pNoteTo->text	= str_dup( pNoteFrom->text );
	    pNoteTo->type	= spoolto->type;
	    count++;
	}
	
    return count;
}

	sprintf(buf,"%d %s been added.\n\r",
	    count, count > 1 ? "penalties have" : "penalty has");
	send_to_char(buf,ch);
    }
====  begin add to do_unread =====
    if (!IS_TRUSTED(ch,ANGEL) && (count = 
                           forward_spool( ch, penalty_list, note_list )) > 0)
    {
	found = TRUE;	
		
	sprintf(buf,"%d %s been forwarded to your note spool.\n\r",
	    count, count > 1 ? "penalties have" : "penalty has");
	send_to_char(buf,ch);
    }
====  end add to unread ====
    if (!found)
	send_to_char("You have no unread notes.\n\r",ch);
}
