Ban

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
7 months 2 days ago - 7 months 2 days 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: 7 months 2 days ago by JTP.

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

More
7 months 2 days 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 Boarder
  • Platinum Boarder
More
7 months 2 days 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 Boarder
  • Platinum Boarder
More
6 months 4 weeks 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
6 months 4 weeks 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 Boarder
  • Platinum Boarder
More
6 months 3 weeks 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
6 months 3 weeks 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 Boarder
  • Platinum Boarder
More
6 months 3 weeks 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: 1.452 seconds