[srvx-commits] CVS: services/src proto-common.c,1.23,1.24
Brought to you by:
entrope
|
From: Zoot <zo...@us...> - 2002-12-17 19:49:17
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv7564/src
Modified Files:
proto-common.c
Log Message:
Ignore remote whois queries from non-opers on hidden host clients (not applicable to GamesNET because remote whois is disabled for users).
Index: proto-common.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-common.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** proto-common.c 22 Nov 2002 04:29:46 -0000 1.23
--- proto-common.c 17 Dec 2002 19:49:13 -0000 1.24
***************
*** 370,383 ****
return 0;
}
! if ((who = GetUserH(argv[2]))) {
! irc_numeric(from, RPL_WHOISUSER, "%s %s %s * :%s", who->nick, who->ident, who->hostname, who->info);
! irc_numeric(from, RPL_WHOISSERVER, "%s %s :%s", who->nick, who->uplink->name, who->uplink->description);
! if (IsOper(who)) {
! irc_numeric(from, RPL_WHOISOPERATOR, "%s :is a megalomaniacal power hungry tyrant", who->nick);
! }
! irc_numeric(from, RPL_ENDOFWHOIS, "%s :End of /WHOIS list", who->nick);
! } else {
irc_numeric(from, ERR_NOSUCHNICK, "%s@%s :No such nick", argv[2], self->name);
}
return 1;
}
--- 370,388 ----
return 0;
}
! if(!(who = GetUserH(argv[2])))
! {
irc_numeric(from, ERR_NOSUCHNICK, "%s@%s :No such nick", argv[2], self->name);
+ return 1;
}
+ if (IsHiddenHost(who) && !IsOper(from)) {
+ /* Just stay quiet. */
+ return 1;
+ }
+ irc_numeric(from, RPL_WHOISUSER, "%s %s %s * :%s", who->nick, who->ident, who->hostname, who->info);
+ irc_numeric(from, RPL_WHOISSERVER, "%s %s :%s", who->nick, who->uplink->name, who->uplink->description);
+ if (IsOper(who)) {
+ irc_numeric(from, RPL_WHOISOPERATOR, "%s :is a megalomaniacal power hungry tyrant", who->nick);
+ }
+ irc_numeric(from, RPL_ENDOFWHOIS, "%s :End of /WHOIS list", who->nick);
return 1;
}
|