Migrated away from using asctime() and ctime() - in favor of strftime().

Added year to several datestamps. Unbounded dates are locale-specific.
- Minor re-formatting was needed for STAT PLAYER and SHOW PLAYER.
The 'slay' feature of do_kill now requires a GRGOD or higher.
'last *' and 'last all' are now synonyms.
This commit is contained in:
wyld-sw
2015-09-18 09:16:04 -04:00
parent ffead13dc1
commit 5119361f15
10 changed files with 178 additions and 176 deletions

View File

@@ -453,7 +453,7 @@ static bool is_ibt_logger(IBT_DATA *ibtData, struct char_data *ch)
ACMD(do_ibt)
{
char arg[MAX_STRING_LENGTH], arg2[MAX_STRING_LENGTH];
char buf[MAX_STRING_LENGTH], *arg_text, imp[30];
char buf[MAX_STRING_LENGTH], *arg_text, imp[30], timestr[128];
int i, num_res, num_unres;
IBT_DATA *ibtData, *first_ibt, *last_ibt;
int ano=0;
@@ -516,9 +516,13 @@ ACMD(do_ibt)
if ((GET_LEVEL(ch) < LVL_IMMORT) && (!is_ibt_logger(ibtData, ch))) {
send_to_char(ch, "Sorry but you may only view %ss you have posted yourself.\n\r", ibt_types[subcmd]);
} else {
send_to_char(ch, "%s%s by %s%s\r\n",QCYN, ibt_types[subcmd], QYEL, ibtData->name);
send_to_char(ch, "%sSubmitted: %s%s", QCYN, QYEL, ibtData->dated ? ctime((const time_t*)&ibtData->dated) : "Unknown\r\n");
if (ibtData->dated != 0) {
strftime(timestr, sizeof(timestr), "%c", localtime(&(ibtData->dated)));
} else {
strcpy(timestr, "Unknown");
}
send_to_char(ch, "%sSubmitted: %s%s\r\n", QCYN, QYEL, timestr);
if (GET_LEVEL(ch) >= LVL_IMMORT) {
send_to_char(ch, "%sLevel: %s%d\r\n",QCYN, QYEL, ibtData->level);
send_to_char(ch, "%sRoom : %s%d\r\n",QCYN, QYEL, ibtData->room);