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

@@ -118,7 +118,7 @@ static void write_ban_list(void)
return;
}
#define BAN_LIST_FORMAT "%-25.25s %-8.8s %-10.10s %-16.16s\r\n"
#define BAN_LIST_FORMAT "%-25.25s %-8.8s %-15.15s %-16.16s\r\n"
ACMD(do_ban)
{
char flag[MAX_INPUT_LENGTH], site[MAX_INPUT_LENGTH], *nextchar;
@@ -144,8 +144,7 @@ ACMD(do_ban)
for (ban_node = ban_list; ban_node; ban_node = ban_node->next) {
if (ban_node->date) {
strlcpy(timestr, asctime(localtime(&(ban_node->date))), 10);
timestr[10] = '\0';
strftime(timestr, sizeof(timestr), "%a %b %d %Y", localtime(&(ban_node->date)));
} else
strcpy(timestr, "Unknown"); /* strcpy: OK (strlen("Unknown") < 16) */