diff -i smaug14/src/boards.c smaug18/src/boards.c 8c8 < * Tricops and Fireblade | * --- > * Tricops, Fireblade, Edmond, Conran | * 30c30 < /* Defines for voting on notes. -- Narn */ --- > /* Defines for voting on notes. -- Edmond - update for ballot */ 32,33c32,35 < #define VOTE_OPEN 1 < #define VOTE_CLOSED 2 --- > #define VOTE_CLOSED 1 > #define VOTE_BCLOSED 2 > #define VOTE_OPEN 3 > #define VOTE_BALLOT 4 138a141,142 > fprintf( fpout, "Extra_ballots %s~\n", tboard->extra_ballots ); > fprintf( fpout, "Ballot_level %d\n", tboard->min_ballot_level ); 188,190c192,195 < if ( is_name( "all", pnote->to_list ) ) < return TRUE; < --- > /* PROJECT 57 > if ( is_name( "all", pnote->to_list ) ) > return TRUE; > */ 241c246 < "Sender %s~\nDate %s~\nTo %s~\nSubject %s~\nVoting %d\nYesvotes %s~\nNovotes %s~\nAbstentions %s~\nText\n%s~\n\n", --- > "Sender %s~\nDate %s~\nTo %s~\nSubject %s~\nVoting %d\nYesvotes %s~\nNovotes %s~\nAbstentions %s~\nYestally %d\nNotally %d\nAbstaintally %d\nNoremove %d\nText\n%s~\n\n", 243c248,249 < pnote->novotes, pnote->abstentions, pnote->text ); --- > pnote->novotes, pnote->abstentions, pnote->yestally, pnote->notally, pnote->abstaintally, > pnote->no_remove, pnote->text ); 409a416,420 > bool name_list = FALSE; > > /* > bool noarg = TRUE; > */ 446a458 > #ifdef O 490,491c502,504 < ( pnote->voting != VOTE_NONE ) ? ( pnote->voting == VOTE_OPEN ? 'V' : 'C' ) : ':', < pnote->date, pnote->subject ); --- > ( pnote->voting != VOTE_NONE ) ? > ( ( pnote->voting > VOTE_BCLOSED ) ? > ( ( pnote->voting == VOTE_OPEN ) ? 'V' : 'B' ) : 'C' ) : ':', pnote->date, pnote->subject ); 523a537 > #endif 525c539 < if ( !str_cmp( arg, "list" ) ) --- > if ( !str_cmp( arg, "list" ) || !str_cmp( arg, "mine" ) ) 526a541,542 > int mine = 0; > 537a554,561 > if ( !str_cmp( arg, "mine" ) ) > mine = 1; > > /* > * Check for note list <player> > */ > if ( !is_number( arg_passed ) && arg_passed[0] != '\0' ) > name_list = TRUE; 539a564 > arg_passed = one_argument( arg_passed, arg ); /*For note list <player> */ 559a585 > anum = 0; 563c589,591 < if ( ( first_list && vnum >= first_list ) || !first_list ) --- > if ( ( first_list && vnum >= first_list ) > || ( name_list && !str_cmp( arg, pnote->sender ) ) || ( !name_list && !first_list ) ) > { 568,569c596,601 < ( pnote->voting != VOTE_NONE ) ? ( pnote->voting == VOTE_OPEN ? 'V' : 'C' ) : ':', < pnote->to_list, pnote->subject ); --- > ( pnote->voting != VOTE_NONE ) ? > ( ( pnote->voting > VOTE_BCLOSED ) ? > ( ( pnote->voting == VOTE_OPEN ) ? 'V' : 'B' ) > : 'C' ) : ':', pnote->to_list, pnote->subject ); > anum++; > } 570a603,604 > if ( anum == 0 && name_list ) > pager_printf( ch, "There are no notes posted by %s.\n\r", capitalize( arg ) ); 596c630 < if ( is_note_to( ch, pnote ) || get_trust( ch ) >= sysdata.read_all_mail ) --- > if ( is_note_to( ch, pnote ) || ( !mine && get_trust( ch ) >= sysdata.read_all_mail ) ) 598a633,634 > else if ( mine && get_trust( ch ) >= sysdata.read_all_mail ) > vnum++; 650,651c686,694 < pager_printf( ch, "Votes:\n\rYes: %s\n\rNo: %s\n\rAbstain: %s\n\r", < pnote->yesvotes, pnote->novotes, pnote->abstentions ); --- > if ( pnote->voting == VOTE_OPEN || > pnote->voting == VOTE_CLOSED || > get_trust( ch ) >= board->min_ballot_level || > ( board->extra_ballots[0] != '\0' && is_name( ch->name, board->extra_ballots ) ) ) > pager_printf( ch, "Votes:\n\rYes: %s\n\rNo: %s\n\rAbstain: %s\n\r", pnote->yesvotes, > pnote->novotes, pnote->abstentions ); > else > pager_printf( ch, "Votes:\n\rYes: %d\n\rNo: %d\n\rAbstain: %d\n\r", pnote->yestally, > pnote->notally, pnote->abstaintally ); 690a734,782 > if ( !str_cmp( arg, "noremove" ) ) > { > char arg2[MAX_INPUT_LENGTH]; > > arg_passed = one_argument( arg_passed, arg2 ); > > if ( !IS_IMMORTAL( ch ) ) > { > send_to_char( "Huh?\n\r", ch ); > } > board = find_board( ch ); > if ( !board ) > { > send_to_char( "There is no bulletin board here.\n\r", ch ); > return; > } > if ( !can_read( ch, board ) ) > { > send_to_char( "You cannot read this board.\n\r", ch ); > return; > } > if ( is_number( arg2 ) ) > anum = atoi( arg2 ); > else > { > send_to_char( "Set noremove on which number?\n\r", ch ); > return; > } > > vnum = 1; > for ( pnote = board->first_note; pnote && vnum < anum; pnote = pnote->next ) > vnum++; > if ( !pnote ) > { > send_to_char( "No such note.\n\r", ch ); > return; > } > if ( pnote->no_remove != 0 && pnote->no_remove > ch->level ) > { > send_to_char( "That note is already set to noremove.\n\r", ch ); > return; > } > pnote->no_remove = ch->level; > write_board( board ); > send_to_char( "Noremove flag set.\n\r", ch ); > return; > } > > 738c830 < if ( str_cmp( ch->name, pnote->sender ) ) --- > if ( str_cmp( ch->name, pnote->sender ) && get_trust( ch ) < LEVEL_GREATER ) 742a835,839 > if ( pnote->voting ) > { > send_to_char( "This note has already been made a vote.", ch ); > return; > } 744c841 < act( AT_ACTION, "$n opens voting on a note.", ch, NULL, NULL, TO_ROOM ); --- > act( AT_ACTION, "$n opens voting on a note.", ch, NULL, NULL, TO_CANSEE ); 748a846,863 > if ( !str_cmp( arg_passed, "ballot" ) ) > { > if ( str_cmp( ch->name, pnote->sender ) && get_trust( ch ) < LEVEL_GREATER ) > { > send_to_char( "You are not the author of this note.\n\r", ch ); > return; > } > if ( pnote->voting ) > { > send_to_char( "This note has already been made a vote.", ch ); > return; > } > pnote->voting = VOTE_BALLOT; > act( AT_ACTION, "$n opens a ballot on a note.", ch, NULL, NULL, TO_CANSEE ); > send_to_char( "Ballot opened.\n\r", ch ); > write_board( board ); > return; > } 756,757c871,872 < pnote->voting = VOTE_CLOSED; < act( AT_ACTION, "$n closes voting on a note.", ch, NULL, NULL, TO_ROOM ); --- > pnote->voting = ( pnote->voting == VOTE_BALLOT ? VOTE_BCLOSED : VOTE_CLOSED ); > act( AT_ACTION, "$n closes voting on a note.", ch, NULL, NULL, TO_CANSEE ); 766c881 < if ( pnote->voting != VOTE_OPEN ) --- > if ( ( pnote->voting ) < VOTE_OPEN ) 786,787c901,903 < act( AT_ACTION, "$n votes on a note.", ch, NULL, NULL, TO_ROOM ); < send_to_char( "Ok.\n\r", ch ); --- > pnote->yestally = ( ( pnote->yestally ) ? pnote->yestally + 1 : 1 ); > act( AT_ACTION, "$n votes on a note.", ch, NULL, NULL, TO_CANSEE ); > ch_printf( ch, "You vote yes on %s.\n\r", pnote->subject ); 796,797c912,914 < act( AT_ACTION, "$n votes on a note.", ch, NULL, NULL, TO_ROOM ); < send_to_char( "Ok.\n\r", ch ); --- > pnote->notally = ( ( pnote->notally ) ? pnote->notally + 1 : 1 ); > act( AT_ACTION, "$n votes on a note.", ch, NULL, NULL, TO_CANSEE ); > ch_printf( ch, "You vote no on %s.\n\r", pnote->subject ); 806,807c923,925 < act( AT_ACTION, "$n votes on a note.", ch, NULL, NULL, TO_ROOM ); < send_to_char( "Ok.\n\r", ch ); --- > pnote->abstaintally = ( ( pnote->abstaintally ) ? pnote->abstaintally + 1 : 1 ); > act( AT_ACTION, "$n votes on a note.", ch, NULL, NULL, TO_CANSEE ); > ch_printf( ch, "You abstain on %s.\n\r", pnote->subject ); 846c964 < act( AT_MAGIC, "A piece of parchment magically appears in $n's hands!", ch, NULL, NULL, TO_ROOM ); --- > act( AT_MAGIC, "A piece of parchment magically appears in $n's hands!", ch, NULL, NULL, TO_CANSEE ); 900c1018 < act( AT_MAGIC, "A piece of parchment magically appears in $n's hands!", ch, NULL, NULL, TO_ROOM ); --- > act( AT_MAGIC, "A piece of parchment magically appears in $n's hands!", ch, NULL, NULL, TO_CANSEE ); 961c1079 < act( AT_MAGIC, "A piece of parchment magically appears in $n's hands!", ch, NULL, NULL, TO_ROOM ); --- > act( AT_MAGIC, "A piece of parchment magically appears in $n's hands!", ch, NULL, NULL, TO_CANSEE ); 1118c1236 < act( AT_ACTION, board->opostmessg, ch, NULL, NULL, TO_ROOM ); --- > act( AT_ACTION, board->opostmessg, ch, NULL, NULL, TO_CANSEE ); 1120c1238 < act( AT_ACTION, "$n posts a note.", ch, NULL, NULL, TO_ROOM ); --- > act( AT_ACTION, "$n posts a note.", ch, NULL, NULL, TO_CANSEE ); 1132a1251 > pnote->no_remove = 0; 1149a1269,1379 > if ( !str_cmp( arg, "reply" ) ) > { > > board = find_board( ch ); > if ( !board ) > { > send_to_char( "There is no bulletin board here.\n\r", ch ); > return; > } > if ( !can_read( ch, board ) ) > { > send_to_char( "You cannot read the notes on this board to reply to.\n\r", ch ); > return; > } > > if ( is_number( arg_passed ) ) > { > anum = atoi( arg_passed ); > } > else > { > send_to_char( "Reply to which number?\n\r", ch ); > return; > } > > if ( !IS_MAIL ) > { > vnum = 1; > for ( pnote = board->first_note; pnote && vnum < anum; pnote = pnote->next ) > vnum++; > } > else > { > vnum = 0; > for ( pnote = board->first_note; pnote && vnum < anum; pnote = pnote->next ) > if ( is_note_to( ch, pnote ) || get_trust( ch ) >= sysdata.read_all_mail ) > { > vnum++; > if ( vnum == anum ) > break; > } > } > > if ( !pnote ) > { > send_to_char( "No such note.\n\r", ch ); > return; > } > > if ( ch->substate == SUB_RESTRICTED ) > { > send_to_char( "You cannot write a note from within another command.\n\r", ch ); > return; > } > if ( get_trust( ch ) < sysdata.write_mail_free ) > { > quill = find_quill( ch ); > if ( !quill ) > { > send_to_char( "You need a quill to write a note.\n\r", ch ); > return; > } > if ( quill->value[0] < 1 ) > { > send_to_char( "Your quill is dry.\n\r", ch ); > return; > } > } > if ( ( paper = get_eq_char( ch, WEAR_HOLD ) ) == NULL || paper->item_type != ITEM_PAPER ) > { > if ( get_trust( ch ) < sysdata.write_mail_free ) > { > send_to_char( "You need to be holding a fresh piece of parchment to write a note.\n\r", ch ); > return; > } > paper = create_object( get_obj_index( OBJ_VNUM_NOTE ), 0 ); > if ( ( tmpobj = get_eq_char( ch, WEAR_HOLD ) ) != NULL ) > unequip_char( ch, tmpobj ); > paper = obj_to_char( paper, ch ); > equip_char( ch, paper, WEAR_HOLD ); > act( AT_MAGIC, "A piece of parchment magically appears in $n's hands!", ch, NULL, NULL, TO_CANSEE ); > act( AT_MAGIC, "A piece of parchment appears in your hands.", ch, NULL, NULL, TO_CHAR ); > } > if ( paper->value[0] < 2 ) > { > paper->value[0] = 1; > paper->value[1] = 1; > paper->value[2] = 1; > ed = SetOExtra( paper, "_text_" ); > ch->substate = SUB_WRITING_NOTE; > ch->dest_buf = ed; > if ( get_trust( ch ) < sysdata.write_mail_free ) > --quill->value[0]; > start_editing( ch, ed->description ); > ed = SetOExtra( paper, "_to_" ); > STRFREE( ed->description ); > ed->description = QUICKLINK( pnote->sender ); > sprintf( notebuf, "Re: %s", pnote->subject ); > ed = SetOExtra( paper, "_subject_" ); > STRFREE( ed->description ); > ed->description = STRALLOC( notebuf ); > return; > } > else > { > send_to_char( "You cannot modify this note.\n\r", ch ); > return; > } > } > > 1197c1427,1428 < && ( get_trust( ch ) < sysdata.take_others_mail ) && ( take == 1 ) ) --- > && ( get_trust( ch ) < sysdata.take_others_mail ) > && ( take == 1 ) && str_cmp( ch->name, pnote->sender ) ) 1199c1430 < send_to_char( "Notes addressed to 'all' can not be taken.\n\r", ch ); --- > send_to_char( "Notes addressed to 'all' can only be taken by the author.\n\r", ch ); 1202a1434,1441 > if ( pnote->no_remove != 0 && ( take == 1 || take == 0 ) && ch->level < pnote->no_remove ) > { > if ( take == 0 ) > send_to_char( "You can't remove this note.\n\r", ch ); > else > send_to_char( "You can't take this note.\n\r", ch ); > return; > } 1246c1485,1486 < sprintf( short_desc_buf, "a note from %s to %s", pnote->sender, pnote->to_list ); --- > sprintf( short_desc_buf, "a note from %s to %s: %s", > pnote->sender, pnote->to_list, pnote->subject ); 1262c1502 < act( AT_ACTION, board->otakemessg, ch, NULL, NULL, TO_ROOM ); --- > act( AT_ACTION, board->otakemessg, ch, NULL, NULL, TO_CANSEE ); 1264c1504 < act( AT_ACTION, "$n takes a note.", ch, NULL, NULL, TO_ROOM ); --- > act( AT_ACTION, "$n takes a note.", ch, NULL, NULL, TO_CANSEE ); 1270c1510 < act( AT_ACTION, board->ocopymessg, ch, NULL, NULL, TO_ROOM ); --- > act( AT_ACTION, board->ocopymessg, ch, NULL, NULL, TO_CANSEE ); 1272c1512 < act( AT_ACTION, "$n copies a note.", ch, NULL, NULL, TO_ROOM ); --- > act( AT_ACTION, "$n copies a note.", ch, NULL, NULL, TO_CANSEE ); 1278c1518 < act( AT_ACTION, board->oremovemessg, ch, NULL, NULL, TO_ROOM ); --- > act( AT_ACTION, board->oremovemessg, ch, NULL, NULL, TO_CANSEE ); 1280c1520 < act( AT_ACTION, "$n removes a note.", ch, NULL, NULL, TO_ROOM ); --- > act( AT_ACTION, "$n removes a note.", ch, NULL, NULL, TO_CANSEE ); 1350a1591,1592 > case 'B': > KEY( "Ballot_level", board->min_ballot_level, fread_number( fp ) ); 1353a1596 > KEY( "Extra_ballots", board->extra_ballots, fread_string_nohash( fp ) ); 1368a1612,1613 > if ( !board->extra_ballots ) > board->extra_ballots = str_dup( "" ); 1426a1672 > pnote->no_remove = 0; 1461a1708,1728 > > if ( !str_cmp( word, "yestally" ) ) > { > pnote->yestally = fread_number( fp ); > > if ( str_cmp( fread_word( fp ), "notally" ) ) > break; > pnote->notally = fread_number( fp ); > > if ( str_cmp( fread_word( fp ), "abstaintally" ) ) > break; > pnote->abstaintally = fread_number( fp ); > > word = fread_word( fp ); > } > > } > if ( !str_cmp( word, "Noremove" ) ) > { > pnote->no_remove = fread_number( fp ); > word = fread_word( fp ); 1538a1806,1807 > board->extra_ballots = str_dup( "" ); > board->min_ballot_level = 51; 1559c1828 < send_to_char( " read_group post_group extra_readers extra_removers\n\r", ch ); --- > send_to_char( " read_group post_group extra_readers extra_removers extra_ballots\n\r", ch ); 1853a2123,2153 > if ( !str_cmp( arg2, "ballot" ) ) > { > if ( value < 0 || value > MAX_LEVEL ) > { > send_to_char( "Value outside valid character level range.\n\r", ch ); > return; > } > board->min_ballot_level = value; > write_boards_txt( ); > send_to_char( "Done. (minimum ballot read level set)\n\r", ch ); > return; > } > > if ( !str_cmp( arg2, "extra_ballots" ) ) > { > if ( !argument || argument[0] == '\0' ) > { > send_to_char( "No names specified.\n\r", ch ); > return; > } > if ( !str_cmp( argument, "none" ) ) > buf[0] = '\0'; > else > sprintf( buf, "%s %s", board->extra_ballots, argument ); > DISPOSE( board->extra_ballots ); > board->extra_ballots = str_dup( buf ); > write_boards_txt( ); > send_to_char( "Done. (extra ballot readers set)\n\r", ch ); > return; > } > 1918c2218 < "\n\r&GFilename: &W%-15.15s &GOVnum: &W%-5d &GRead: &W%-2d &GPost: &W%-2d &GRemove: &W%-2d\n\r&GMaxpost: &W%-3d >ype: &W%d\n\r&GPosts: %d\n\r", --- > "\n\r&GFilename: &W%-15.15s &GOVnum: &W%-5d &GRead: &W%-2d &GPost: &W%-2d &GRemove: &W%-2d\n\r&GMaxpost: &W%d &GBallot: &W%-2d >ype: &W%d\n\r&GPosts: %d\n\r", 1920c2220 < board->max_posts, board->type, board->num_posts ); --- > board->max_posts, board->min_ballot_level, board->type, board->num_posts ); 1923,1924c2223,2225 < "&GRead_group: &W%s\n\r&GPost_group: &W%s\n\r&GExtra_readers: &W%s\n\r&GExtra_removers: &W%s\n\r", < board->read_group, board->post_group, board->extra_readers, board->extra_removers ); --- > "&GRead_group: &W%s\n\r&GPost_group: &W%s\n\r&GExtra_readers: &W%s\n\r&GExtra_ballots: &W%s\n\r&GExtra_removers: &W%s\n\r", > board->read_group, board->post_group, board->extra_readers, board->extra_ballots, board->extra_removers ); > 1973a2275,2482 > > /* > * Journal command. Allows users to write notes to an object of type "journal". > * Options are Write, Read and Size. Write and Read options require a numerical > * argument. Option Size retrives v0 or value0 from the object, which is indicitive > * of how many pages are in the journal. > * > * Forced a maximum limit of 50 pages to all journals, just incase someone slipped > * with a value command and we ended up with an object that could store 500 pages. > * This is added in journal write and journal size. Leart. > */ > > void do_journal( CHAR_DATA * ch, char *argument ) > { > char arg1[MAX_INPUT_LENGTH]; > char arg2[MAX_INPUT_LENGTH]; > char buf[MAX_STRING_LENGTH]; > EXTRA_DESCR_DATA *ed; > > > OBJ_DATA *quill = NULL, *journal = NULL; > > int pages; > int anum = 0; > char *text; > > argument = one_argument( argument, arg1 ); > argument = one_argument( argument, arg2 ); > > if ( IS_NPC( ch ) ) > return; > > if ( !ch->desc ) > { > bug( "do_journal: no descriptor", 0 ); > return; > } > switch ( ch->substate ) > { > default: > break; > case SUB_JOURNAL_WRITE: > if ( ( journal = get_eq_char( ch, WEAR_HOLD ) ) == NULL || journal->item_type != ITEM_JOURNAL ) > { > bug( "do_journal: Player not holding journal. (Player: %s)", ch->name ); > stop_editing( ch ); > return; > } > ed = ch->dest_buf; > STRFREE( ed->description ); > ed->description = copy_buffer( ch ); > stop_editing( ch ); > return; > } > if ( arg1[0] == '\0' ) > { > send_to_char( "Syntax: Journal <command>\n\r", ch ); > send_to_char( "\n\r", ch ); > send_to_char( "Where command is one of:\n\r", ch ); > send_to_char( "write read size\n\r", ch ); > return; > } > > /* > * Write option. Allows user to enter the buffer, adding an extra_desc to the > * journal object called "PageX" where X is the argument associated with the write command > */ > > if ( !str_cmp( arg1, "write" ) ) > { > if ( ( journal = get_eq_char( ch, WEAR_HOLD ) ) == NULL || journal->item_type != ITEM_JOURNAL ) > { > send_to_char( "You must be holding a journal in order to write in it.\n\r", ch ); > return; > } > if ( arg2[0] == '\0' || !is_number( arg2 ) ) > { > send_to_char( "Syntax: Journal write <number>\n\r", ch ); > return; > } > if ( get_trust( ch ) < sysdata.write_mail_free ) > { > quill = find_quill( ch ); > if ( !quill ) > { > send_to_char( "You need a quill to write in your journal.\n\r", ch ); > return; > } > if ( quill->value[0] < 1 ) > { > send_to_char( "Your quill is dry.\n\r", ch ); > return; > } > } > if ( journal->value[0] < 1 ) > { > send_to_char( "There are no pages in this journal. Seek an immortal for assistance.\n\r", ch ); > return; > } > /* Force a max value of 50 */ > if ( journal->value[0] > 50 ) > { > journal->value[0] = 50; > bug( "do_journal: Journal size greater than 50 pages! Resetting to 50 pages. (Player: %s)", ch->name ); > } > set_char_color( AT_GREY, ch ); > pages = journal->value[0]; > if ( is_number( arg2 ) ) > { > anum = atoi( arg2 ); > } > if ( pages < anum ) > { > send_to_char( "That page does not exist in this journal.\n\r", ch ); > return; > } > /* Making the edits turn out to be "page1" etc - just so people can't/don't type "look 1" */ > strcpy( buf, "page" ); > strcat( buf, arg2 ); > > ed = SetOExtra( journal, buf ); > ch->substate = SUB_JOURNAL_WRITE; > ch->dest_buf = ed; > if ( get_trust( ch ) < sysdata.write_mail_free ) > --quill->value[0]; > start_editing( ch, ed->description ); > journal->value[1]++; > return; > } > > /* Size option, returns how many pages are in the journal */ > > if ( !str_cmp( arg1, "size" ) ) > { > if ( ( journal = get_eq_char( ch, WEAR_HOLD ) ) == NULL || journal->item_type != ITEM_JOURNAL ) > { > send_to_char( "You must be holding a journal in order to check it's size.\n\r", ch ); > return; > } > if ( journal->value[0] < 1 ) > { > send_to_char( "There are no pages in this journal. Seek an immortal for assistance.\n\r", ch ); > } > else > { > if ( journal->value[0] > 50 ) > { > journal->value[0] = 50; > bug( "do_journal: Journal size greater than 50 pages! Resetting to 50 pages. (Player: %s)", ch->name ); > } > set_char_color( AT_GREY, ch ); > pager_printf( ch, "There are %d pages in this journal.\n\r", journal->value[0] ); > return; > } > } > /* Read option. Players can read the desc on the journal by typing "look page1", but I thought about putting > * in this option anyway. > */ > if ( !str_cmp( arg1, "read" ) ) > { > if ( !arg2 || arg2[0] == '\0' ) > { > send_to_char( "Syntax: Journal read <number>\n\r", ch ); > return; > } > if ( !is_number( arg2 ) ) > { > send_to_char( "Syntax: Journal read <number>\n\r", ch ); > return; > } > if ( is_number( arg2 ) ) > { > anum = atoi( arg2 ); > } > strcpy( buf, "page" ); > strcat( buf, arg2 ); > > if ( ( journal = get_eq_char( ch, WEAR_HOLD ) ) == NULL || journal->item_type != ITEM_JOURNAL ) > { > send_to_char( "You must be holding a journal in order to read it.\n\r", ch ); > return; > } > if ( journal->value[0] > 50 ) > { > journal->value[0] = 50; > bug( "do_journal: Journal size greater than 50 pages! Resetting to 50 pages. (Player: %s)", ch->name ); > } > set_char_color( AT_GREY, ch ); > pages = journal->value[0]; > if ( pages < anum ) > { > send_to_char( "That page does not exist in this journal.\n\r", ch ); > return; > } > if ( ( text = get_extra_descr( buf, journal->first_extradesc ) ) == NULL ) > send_to_char_color( "That journal page is blank.\n\r", ch ); > else > send_to_char_color( text, ch ); > return; > } > > send_to_char( "Syntax: Journal <command>\n\r", ch ); > send_to_char( "\n\r", ch ); > send_to_char( "Where command is one of:\n\r", ch ); > send_to_char( "write read size\n\r", ch ); > return; > > }