Ban

  • JTP
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 5 months ago - 4 years 5 months ago #8360 by JTP
Ban was created by JTP
Hmm it seems when i use ban. Then i tried it today the 19th. But as date it just shows 1. See attachment.

Any idea How to solve ?


I also have an entre from back in november it just says: Thu Nov
But No date
Attachments:
Last edit: 4 years 5 months ago by JTP.

Please Log in or Create an account to join the conversation.

More
4 years 5 months ago #8361 by thomas
Replied by thomas on topic Ban
Seems this is a case of "wrong" formatting.

Have a look at ban.c - github.com/tbamud/tbamud/blob/14855c273a...f8e53/src/ban.c#L119

Does your code look the same here?

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 5 months ago #8362 by JTP
Replied by JTP on topic Ban
I changed mine from 10.10 to 15.15

So now mine also is: #define BAN_LIST_FORMAT "%-25.25s %-8.8s %-15.15s %-16.16s\r\n"

But it did not help

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 5 months ago #8363 by JTP
Replied by JTP on topic Ban
Any other ideas what it could be ?

Please Log in or Create an account to join the conversation.

More
4 years 5 months ago #8364 by thomas
Replied by thomas on topic Ban
Well, all code related to that display is right there. Is the code you have there changed compared to the link I sent you above?

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 5 months ago #8366 by JTP
Replied by JTP on topic Ban
Seems that i in do_ban had:
strlcpy(timestr, asctime(localtime(&(ban_node->date))), 10);
timestr[10] = '\0';


When i entered:

strftime(timestr, sizeof(timestr), "%a %b %d %Y", localtime(&(ban_node->date)));

all was fine now including year to

Thanks Thomas

Please Log in or Create an account to join the conversation.

More
4 years 5 months ago #8368 by thomas
Replied by thomas on topic Ban
Nice that you found out. This is why I post links to the "reference" implementation, so you can compare.

We had practically no way of knowing that you had that line there.

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 5 months ago #8369 by JTP
Replied by JTP on topic Ban
Yea Thanks for that. My version is alittle old

Please Log in or Create an account to join the conversation.

Time to create page: 0.126 seconds