[May 27 2008] - Rumble

Fixed list_obj_to_char from only checking invisibility on first object of the same vnum. (thanks Laoris)
  Added object stacking when looking at a character's inventory. (thanks Jamdog)
[May 22 2008] - Rumble
  Added zone name to where command. (thanks Jamdog)
[May 21 2008] - Rumble
  Rewrite of void script_vlog to prevent possible crash bug on some OS's. (thanks Jamdog)
This commit is contained in:
Rumble 2008-05-27 19:39:32 +00:00
parent 37c7e2fb0c
commit c486097e81
3 changed files with 79 additions and 61 deletions

View file

@ -1290,26 +1290,24 @@ void script_vlog(const char *format, va_list args)
char output[MAX_STRING_LENGTH];
struct descriptor_data *i;
snprintf(output, sizeof(output), "SCRIPT ERR: %s", format);
/* parse the args, making the error message */
vsnprintf(output, sizeof(output) - 2, format, args);
basic_mud_vlog(output, args);
/* Save to the syslog file */
basic_mud_log("SCRIPT ERROR: %s", output);
/* the rest is mostly a rip from basic_mud_log() */
strcpy(output, "[ "); /* strcpy: OK */
vsnprintf(output + 2, sizeof(output) - 6, format, args);
strcat(output, " ]\r\n"); /* strcat: OK */
/* And send to imms */
for (i = descriptor_list; i; i = i->next) {
if (STATE(i) != CON_PLAYING || IS_NPC(i->character)) /* switch */
continue;
if (GET_LEVEL(i->character) < LVL_BUILDER)
continue;
if (PLR_FLAGGED(i->character, PLR_WRITING))
continue;
if (NRM > (PRF_FLAGGED(i->character, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(i->character, PRF_LOG2) ? 2 : 0))
continue;
for (i = descriptor_list; i; i = i->next) {
if (STATE(i) != CON_PLAYING || IS_NPC(i->character)) /* switch */
continue;
if (GET_LEVEL(i->character) < LVL_BUILDER)
continue;
if (PLR_FLAGGED(i->character, PLR_WRITING))
continue;
if (NRM > (PRF_FLAGGED(i->character, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(i->character, PRF_LOG2) ? 2 : 0))
continue;
send_to_char(i->character, "%s%s%s", CCGRN(i->character, C_NRM), output, CCNRM(i->character, C_NRM));
send_to_char(i->character, "%s[ %s ]%s\r\n", CCGRN(i->character, C_NRM), output, CCNRM(i->character, C_NRM));
}
}