Welcome to the Builder Academy

Question IP logging

More
18 May 2021 20:23 - 18 May 2021 20:24 #9873 by JTP
IP logging was created by JTP
I have a problem with someone that many times a day connect, but never login or create a char...how could I add a log showing the IP of someone that connects but doesn’t log on ?

all that I see in game is:

[ Losing descriptor without char. ]
Last edit: 18 May 2021 20:24 by JTP.

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

More
18 May 2021 22:20 #9875 by thomas
Replied by thomas on topic IP logging
The log message comes from here: github.com/tbamud/tbamud/blob/master/src/comm.c#L2092

You can alter it slightly:
Code:
- mudlog(CMP, LVL_IMMORT, TRUE, "Losing descriptor without char."); + mudlog(CMP, LVL_IMMORT, TRUE, "Losing descriptor without char. Source IP: %s", d->host);
At least I think that should work.
The following user(s) said Thank You: mr514

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

More
31 May 2021 19:45 #9876 by JTP
Replied by JTP on topic IP logging
Ok it shows the DNS. Any chance that it could revolve the IP number instead ?

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

More
31 May 2021 22:17 #9877 by thomas
Replied by thomas on topic IP logging
Not directly. Currently, the code finds the hostname for the connecting host and only that is stored in the descriptor. The code that does this is here:
github.com/tbamud/tbamud/blob/5305783e1b...342/src/comm.c#L1516

So you could rewrite to support both, or change the lookup to only use numeric address and ignore the hostname. But it will need coding.

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

Time to create page: 0.179 seconds