mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
Removed ideas/typos/bugs when they are aborted.
This commit is contained in:
parent
165d7feb87
commit
2f12752373
3 changed files with 15 additions and 0 deletions
11
src/ibt.c
11
src/ibt.c
|
@ -1170,3 +1170,14 @@ void free_ibt_lists()
|
|||
}
|
||||
}
|
||||
|
||||
void clean_ibt_list(int mode)
|
||||
{
|
||||
IBT_DATA *ibtData = get_first_ibt(mode), *ibtTemp;
|
||||
while (ibtData) {
|
||||
ibtTemp = ibtData;
|
||||
ibtData = ibtData->next;
|
||||
if (!ibtTemp->body || !*ibtTemp->body) {
|
||||
free_ibt(mode, ibtTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,3 +100,4 @@ void ibtedit_parse(struct descriptor_data *d, char *arg);
|
|||
void ibtedit_string_cleanup(struct descriptor_data *d, int terminator);
|
||||
void free_ibt_lists();
|
||||
void free_olc_ibt(IBT_DATA *toFree);
|
||||
void clean_ibt_list(int mode);
|
||||
|
|
|
@ -270,6 +270,7 @@ static void playing_string_cleanup(struct descriptor_data *d, int action)
|
|||
save_ibt_file(SCMD_IDEA);
|
||||
} else {
|
||||
write_to_output(d, "Idea aborted!\r\n");
|
||||
clean_ibt_list(SCMD_IDEA);
|
||||
}
|
||||
}
|
||||
if (PLR_FLAGGED(d->character, PLR_BUG)) {
|
||||
|
@ -278,6 +279,7 @@ static void playing_string_cleanup(struct descriptor_data *d, int action)
|
|||
save_ibt_file(SCMD_BUG);
|
||||
} else {
|
||||
write_to_output(d, "Bug aborted!\r\n");
|
||||
clean_ibt_list(SCMD_BUG);
|
||||
}
|
||||
}
|
||||
if (PLR_FLAGGED(d->character, PLR_TYPO)) {
|
||||
|
@ -286,6 +288,7 @@ static void playing_string_cleanup(struct descriptor_data *d, int action)
|
|||
save_ibt_file(SCMD_TYPO);
|
||||
} else {
|
||||
write_to_output(d, "Typo aborted!\r\n");
|
||||
clean_ibt_list(SCMD_TYPO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue