This update includes the transition to protocoloutput while maintaining backwards compatibility with all MUDs still using proc_colors
This commit is contained in:
17
src/aedit.c
17
src/aedit.c
@@ -203,6 +203,7 @@ static void aedit_save_internally(struct descriptor_data *d) {
|
||||
static void aedit_save_to_disk(struct descriptor_data *d) {
|
||||
FILE *fp;
|
||||
int i;
|
||||
char buf[MAX_STRING_LENGTH];
|
||||
if (!(fp = fopen(SOCMESS_FILE_NEW, "w+"))) {
|
||||
char error[MAX_STRING_LENGTH];
|
||||
snprintf(error, sizeof(error), "Can't open socials file '%s'", SOCMESS_FILE);
|
||||
@@ -218,23 +219,31 @@ static void aedit_save_to_disk(struct descriptor_data *d) {
|
||||
soc_mess_list[i].min_char_position,
|
||||
soc_mess_list[i].min_victim_position,
|
||||
soc_mess_list[i].min_level_char);
|
||||
fprintf(fp, "%s\n%s\n%s\n%s\n",
|
||||
|
||||
sprintf(buf, "%s\n%s\n%s\n%s\n",
|
||||
((soc_mess_list[i].char_no_arg)?soc_mess_list[i].char_no_arg:"#"),
|
||||
((soc_mess_list[i].others_no_arg)?soc_mess_list[i].others_no_arg:"#"),
|
||||
((soc_mess_list[i].char_found)?soc_mess_list[i].char_found:"#"),
|
||||
((soc_mess_list[i].others_found)?soc_mess_list[i].others_found:"#"));
|
||||
fprintf(fp, "%s\n%s\n%s\n%s\n",
|
||||
fprintf(fp, convert_from_tabs(buf), 0);
|
||||
|
||||
sprintf(buf, "%s\n%s\n%s\n%s\n",
|
||||
((soc_mess_list[i].vict_found)?soc_mess_list[i].vict_found:"#"),
|
||||
((soc_mess_list[i].not_found)?soc_mess_list[i].not_found:"#"),
|
||||
((soc_mess_list[i].char_auto)?soc_mess_list[i].char_auto:"#"),
|
||||
((soc_mess_list[i].others_auto)?soc_mess_list[i].others_auto:"#"));
|
||||
fprintf(fp, "%s\n%s\n%s\n",
|
||||
fprintf(fp, convert_from_tabs(buf), 0);
|
||||
|
||||
sprintf(buf, "%s\n%s\n%s\n",
|
||||
((soc_mess_list[i].char_body_found)?soc_mess_list[i].char_body_found:"#"),
|
||||
((soc_mess_list[i].others_body_found)?soc_mess_list[i].others_body_found:"#"),
|
||||
((soc_mess_list[i].vict_body_found)?soc_mess_list[i].vict_body_found:"#"));
|
||||
fprintf(fp, "%s\n%s\n\n",
|
||||
fprintf(fp, convert_from_tabs(buf), 0);
|
||||
|
||||
sprintf(buf, "%s\n%s\n\n",
|
||||
((soc_mess_list[i].char_obj_found)?soc_mess_list[i].char_obj_found:"#"),
|
||||
((soc_mess_list[i].others_obj_found)?soc_mess_list[i].others_obj_found:"#"));
|
||||
fprintf(fp, convert_from_tabs(buf), 0);
|
||||
}
|
||||
|
||||
fprintf(fp, "$\n");
|
||||
|
||||
Reference in New Issue
Block a user