commit d21afce2b6fdc919a80c4eb1d6ba781c1cf63f3c from: Alexander Barton date: Wed Sep 26 20:55:10 2012 UTC Allow user mode +x only when "CloakHostModeX" is set Allow users to "cloak" their hostname only when the configuration variable "CloakHostModeX" (introduced in 19.2) is set. Otherwise, only IRC opertators, other servers, and services are allowed to set mode +x. This prevents regular users from changing their hostmask to the name of the IRC server itself, which confused quite a few people ;-) This fixes bug #133. commit - 808c291c76b7ecb4ae13b6ee12e8afe658b627c1 commit + d21afce2b6fdc919a80c4eb1d6ba781c1cf63f3c blob - 640df4ee3e81b7def928c2e4b2e3a3256a5574c8 blob + b445958159e85bdd03cc4b6328c1c59bb0938df1 --- INSTALL +++ INSTALL @@ -11,6 +11,14 @@ I. Upgrade Information ~~~~~~~~~~~~~~~~~~~~~~ + +Differences to version 19.x + +- Starting with ngIRCd 20, users can "cloak" their hostname only when the + configuration variable "CloakHostModeX" (introduced in 19.2) is set. + Otherwise, only IRC opertators, other servers, and services are allowed to + set mode +x. This prevents regular users from changing their hostmask to + the name of the IRC server itself, which confused quite a few people ;-) Differences to version 17 blob - 7380c6eb5c70308b030097aadf58a9ab3bc933e4 blob + 90f638d811219282b34af51c8cf8369e7548e4f7 --- src/ngircd/irc-mode.c +++ src/ngircd/irc-mode.c @@ -278,9 +278,15 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Ori ok = IRC_WriteStrClient(Origin, ERR_RESTRICTED_MSG, Client_ID(Origin)); - else + else if (!set || Conf_CloakHostModeX[0] + || Client_Type(Client) == CLIENT_SERVER + || Client_OperByMe(Client)) { x[0] = 'x'; send_RPL_HOSTHIDDEN_MSG = true; + } else + ok = IRC_WriteStrClient(Origin, + ERR_NOPRIVILEGES_MSG, + Client_ID(Origin)); break; default: if (Client_Type(Client) != CLIENT_SERVER) {