From 8650bb40f9aa8cd0a430397c13e0f3bbe0e6f3dc Mon Sep 17 00:00:00 2001 From: stskeeps Date: Tue, 24 Apr 2007 09:03:26 +0000 Subject: [PATCH] Index: Changes =================================================================== RCS file: /home/cmunk/ircsystems/cvsroot/unreal/Changes,v retrieving revision 1.1.1.1.2.1.2.1.2.2360 diff -u -r1.1.1.1.2.1.2.1.2.2360 Changes --- Changes 24 Apr 2007 08:54:04 -0000 1.1.1.1.2.1.2.1.2.2360 +++ Changes 24 Apr 2007 09:03:21 -0000 @@ -1591,3 +1591,6 @@ - #0003146 reported by vonitsanet, regarding Modes O,S (etc) not rejected for modes-on-connect fixed by djGrrr - #0003289 suggested and patched by fbi, adding (Ping timeout: 182 seconds) +- #0002932 reported by therock247uk, patched by WolfSage, regarding Local + opers can /chghost /chgident /chgname on someone thats on another server on + the network --- Changes | 3 +++ src/modules/m_chghost.c | 7 +++++++ src/modules/m_chgident.c | 7 +++++++ src/modules/m_chgname.c | 7 +++++++ 4 files changed, 24 insertions(+) diff --git a/Changes b/Changes index 760152323..f0dc0ea53 100644 --- a/Changes +++ b/Changes @@ -1591,3 +1591,6 @@ MOTDs - #0003146 reported by vonitsanet, regarding Modes O,S (etc) not rejected for modes-on-connect fixed by djGrrr - #0003289 suggested and patched by fbi, adding (Ping timeout: 182 seconds) +- #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 */