$Log$
+Revision 1.347 1999/08/06 02:57:26 ajc
+* locate_host.c: use strdoop() and phree() instead of strdup() and free()
+* serv_icq.c: run learned IP's through Citadel's locate_host() & put in Wholist
+
Revision 1.346 1999/08/05 17:58:59 ajc
* RWHO command now returns express message code in postion 3
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
-
section */
}
/* check if the forward DNS agrees; if not, they're spoofing */
- i = strdup(ch->h_name);
+ i = strdoop(ch->h_name);
ch = gethostbyname(i);
- free(i);
+ phree(i);
if (ch == NULL)
goto bad_dns;
for (; *ch->h_addr_list; ch->h_addr_list++)
if (!memcmp(*ch->h_addr_list, addr,
sizeof *addr)) {
- strncpy(tbuf, ch->h_name, 24);
+ safestrncpy(tbuf, ch->h_name, 24);
goto end;
}
goto bad_dns; /* they were spoofing. report a numeric IP
DWORD uin;
char name[32];
DWORD status;
+ char host[25];
};
0, /* no session ID */
ThisICQ->icq_cl[i].name,
icq_ConvertStatus2Str(ThisICQ->icq_cl[i].status),
- " ", /* FIX add host */
+ ThisICQ->icq_cl[i].host,
" ", /* no client */
time(NULL), /* now? */
" ", /* no last command */
void CtdlICQ_UserOnline(DWORD uin, DWORD status, DWORD ip,
DWORD port, DWORD realip) {
+ DWORD decoded_ip;
+
CtdlICQ_Status_Update(uin, status);
+ decoded_ip = ntohl(ip);
+ locate_host(CtdlICQ_CLent(uin)->host, &decoded_ip);
}