diff --git a/Changes b/Changes index 4779313e9..7074e777d 100644 --- a/Changes +++ b/Changes @@ -1452,3 +1452,6 @@ - Fixed #0003171 reported by danieldg (typo) doc/technical - #0003146 reported by vonitsanet, regarding Modes O,S (etc) not rejected for modes-on-connect fixed by djGrrr +- #0002932 reported by therock247uk, patched by WolfSage, regarding Local + opers can /chghost /chgident /chgname on someone thats on another server on + the network. diff --git a/src/modules/m_chghost.c b/src/modules/m_chghost.c index 81127d7b7..dce18d17c 100644 --- a/src/modules/m_chghost.c +++ b/src/modules/m_chghost.c @@ -146,6 +146,13 @@ DLLFUNC int m_chghost(aClient *cptr, aClient *sptr, int parc, char *parv[]) if ((acptr = find_person(parv[1], NULL))) { + if (MyClient(sptr) && (IsLocOp(sptr) && !MyClient(acptr))) + { + sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, + parv[0]); + return 0; + } + DYN_LOCAL(char, did_parts, acptr->user->joined); if (!strcmp(GetHost(acptr), parv[2])) { diff --git a/src/modules/m_chgident.c b/src/modules/m_chgident.c index 3e9a46c06..4c28c56fd 100644 --- a/src/modules/m_chgident.c +++ b/src/modules/m_chgident.c @@ -158,6 +158,13 @@ int legalident = 1; if ((acptr = find_person(parv[1], NULL))) { + if (MyClient(sptr) && (IsLocOp(sptr) && !MyClient(acptr))) + { + sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, + parv[0]); + return 0; + } + DYN_LOCAL(char, did_parts, acptr->user->joined); switch (UHOST_ALLOWED) { diff --git a/src/modules/m_chgname.c b/src/modules/m_chgname.c index db8b204c0..f9b668c22 100644 --- a/src/modules/m_chgname.c +++ b/src/modules/m_chgname.c @@ -146,6 +146,13 @@ DLLFUNC int m_chgname(aClient *cptr, aClient *sptr, int parc, char *parv[]) if ((acptr = find_person(parv[1], NULL))) { + if (MyClient(sptr) && (IsLocOp(sptr) && !MyClient(acptr))) + { + sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, + parv[0]); + return 0; + } + /* set the realname first to make n:line checking work */ ircsprintf(acptr->info, "%s", parv[2]); /* only check for n:lines if the person who's name is being changed is not an oper */