Another option, if you are comfortable using
multiple processes or threads, is to perform the
reverse DNS lookups in a separate process or thread.
Just poll every once in awhile to see whether an
answer has been recieved. If you store both the IP
address and the reverse DNS text string in separate
variables, then if there is no reverse DNS data use
the IP address, otherwise use the reverse DNS data.

On Sun, 2005-01-02 at 23:34 -0500, Sandi Fallon wrote:
> Nevermind.... I found it.
> 
> Just for the record:
> 
>                 sprintf( log_buf, "Sock.sinaddr:  %s", buf );
>                 log_string( log_buf );
> 
>                 /* from = gethostbyaddr( (char *) &sock.sin_addr,
>                 sizeof(sock.sin_addr), AF_INET ); */
>                 from = NULL;
> 
>                 dnew->host = str_dup( from ? from->h_name : buf );
>         }
> 
>         /*
>         * Swiftest: I added the following to ban sites.  I don't
>         * endorse banning of sites...
> 
> That's right before the siteban stuff. I took it out because I was
> having trouble with a name server, and lagging the game on logins.
> 
> 
> Sandi
> 

Reply via email to