[srvx-commits] CVS: services/src opserv.c,1.254,1.255
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-08-04 01:48:43
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv31359/src
Modified Files:
opserv.c
Log Message:
make OpServ use the server-announced IP when ?hostscan'ing a user by nick (fixes bug 588887)
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.254
retrieving revision 1.255
diff -C2 -r1.254 -r1.255
*** opserv.c 3 Aug 2002 04:27:03 -0000 1.254
--- opserv.c 4 Aug 2002 01:48:39 -0000 1.255
***************
*** 173,176 ****
--- 173,177 ----
#define OSMSG_SOCKCHECK_STATS "Since booting, I have checked %d clients for illicit proxies, and detected %d proxy hosts.\nI am currently checking %d clients (out of %d max) and have a backlog of %d more to start on.\nI currently have %d hosts cached.\nI know how to detect %d kinds of proxies."
#define OSMSG_UNKNOWN_STATS "Unknown statistics type $b%s$b"
+ #define OSMSG_SPOOFED_IP "%s has a spoofed, hidden or localnet IP."
#define OSMSG_ADDRESS_QUEUED "$b%s$b is now queued to be proxy-checked."
#define OSMSG_HOST_CLEARED "$b%s$b was cleared from the cached hosts list."
***************
*** 1692,1695 ****
--- 1693,1697 ----
unsigned int n;
unsigned long addr;
+ char hnamebuf[64];
OPSERV_MIN_PARMS(2, false);
***************
*** 1698,1703 ****
char *scanhost;
! scanhost = un ? un->hostname : (char*)argv[n];
! if (getipbyname(scanhost, &addr)) {
sockcheck_queue_address(addr);
opserv_notice(user, OSMSG_ADDRESS_QUEUED, scanhost);
--- 1700,1712 ----
char *scanhost;
! if (un) {
! if ((un->ip == 0) || (un->ip == 0x7f000001)) {
! opserv_notice(user, OSMSG_SPOOFED_IP, un->nick);
! } else {
! sprintf(hnamebuf, "%ld.%ld.%ld.%ld", (un->ip >> 24) & 255, (un->ip >> 16) & 255, (un->ip >> 8) & 255, un->ip & 255);
! sockcheck_queue_address(un->ip);
! opserv_notice(user, OSMSG_ADDRESS_QUEUED, hnamebuf);
! }
! } else if (getipbyname(scanhost, &addr)) {
sockcheck_queue_address(addr);
opserv_notice(user, OSMSG_ADDRESS_QUEUED, scanhost);
|