void mpedit (CHAR_DATA * ch, char *argument) { MPROG_CODE *pMcode; char arg[MAX_INPUT_LENGTH]; char command[MAX_INPUT_LENGTH]; int cmd; AREA_DATA *ad; smash_tilde (argument); strcpy (arg, argument); argument = one_argument (argument, command); EDIT_MPCODE (ch, pMcode); if (pMcode) { ad = get_vnum_area (pMcode->vnum); if (ad == NULL) { /* ??? */ edit_done (ch); return; } if (!IS_BUILDER (ch, ad)) { send_to_char ("MPEdit: Insufficient security to modify code.\n\r", ch); edit_done (ch); return; } } if (command[0] == '\0') { mpedit_show (ch, argument); return; } if (!str_cmp (command, "done")) { edit_done (ch); return; } for (cmd = 0; mpedit_table[cmd].name != NULL; cmd++) { if (!str_prefix (command, mpedit_table[cmd].name)) { if ((*mpedit_table[cmd].olc_fun) (ch, argument) && pMcode) if ((ad = get_vnum_area (pMcode->vnum)) != NULL) SET_BIT (ad->area_flags, AREA_CHANGED); return; } } interpret (ch, arg); return; }
void mpedit (CHAR_DATA * ch, char *argument) { // MPROG_CODE *pMcode; char arg[MAX_INPUT_LENGTH]; char command[MAX_INPUT_LENGTH]; int cmd; smash_tilde (argument); strcpy (arg, argument); argument = one_argument (argument, command); // EDIT_MPCODE (ch, pMcode); if (ch->pcdata->security < 7) { send_to_char ("MPEdit: Insufficient security to modify code\n\r", ch); edit_done (ch); return; } if (command[0] == '\0') { mpedit_show (ch, argument); return; } if (!str_cmp (command, "done")) { edit_done (ch); return; } for (cmd = 0; mpedit_table[cmd].name != NULL; cmd++) { if (!str_prefix (command, mpedit_table[cmd].name)) { (*mpedit_table[cmd].olc_fun) (ch, argument); return; } } interpret (ch, arg); return; }
void mpedit( CHAR_DATA *ch, char *argument) { MPROG_CODE *pMcode; char arg[MAX_INPUT_LENGTH]; char command[MAX_INPUT_LENGTH]; int cmd; AREA_DATA *ad; smash_tilde(argument); strcpy(arg, argument); argument = one_argument( argument, command); EDIT_MPCODE(ch, pMcode); if (pMcode) { ad = get_vnum_area( pMcode->vnum ); if ( ad == NULL ) /* ??? */ { edit_done(ch); return; } if(!IS_IMP(ch)) { if((IS_SET(ad->area_flags, AREA_NOIMM)) || (IS_SET(ad->area_flags, AREA_IMP))) { send_to_char( "\n\r{GIf you need something changed in this {WAREA{G, please note the IMPs!{x\n\r",ch); return; } } } if (command[0] == '\0') { mpedit_show(ch, argument); return; } if (!str_cmp(command, "done") ) { edit_done(ch); return; } for (cmd = 0; mpedit_table[cmd].name != NULL; cmd++) { if (!str_prefix(command, mpedit_table[cmd].name) ) { if ((*mpedit_table[cmd].olc_fun) (ch, argument) && pMcode) if ((ad = get_vnum_area(pMcode->vnum)) != NULL) SET_BIT(ad->area_flags, AREA_CHANGED); return; } } interpret(ch, arg); return; }
void mpedit( CHAR_DATA *ch, char *argument ) { PROG_CODE * pMcode; char arg[ MAX_INPUT_LENGTH ]; char command[ MAX_INPUT_LENGTH ]; char log_buf[ MAX_STRING_LENGTH ]; int cmd; AREA_DATA *ad; smash_tilde( argument ); strcpy( arg, argument ); argument = one_argument( argument, command ); EDIT_MPCODE( ch, pMcode ); if ( pMcode ) { ad = pMcode->area; if ( ad == NULL ) /* ? */ { edit_done( ch ); return ; } if ( !IS_BUILDER( ch, ad ) ) { send_to_char( "MPEdit: Insufficient security to modify code.\n\r", ch ); edit_done( ch ); return ; } } if ( command[ 0 ] == '\0' ) { mpedit_show( ch, argument ); return ; } if ( !str_cmp( command, "done" ) ) { edit_done( ch ); return ; } for ( cmd = 0; mpedit_table[ cmd ].name != NULL; cmd++ ) { if ( !str_prefix( command, mpedit_table[ cmd ].name ) ) { if ( ( *mpedit_table[ cmd ].olc_fun ) ( ch, argument ) && pMcode ) { if ( ( ad = pMcode->area ) != NULL ) { SET_BIT( ad->area_flags, AREA_CHANGED ); } append_file_format_daily( ch, BUILD_LOG_FILE, "-> mpedit %s: %s", pMcode ? pMcode->name: "0", arg ); } return ; } } interpret( ch, arg ); return ; }