From b18d53354615709b18ae4240c61a3a658fac8a82 Mon Sep 17 00:00:00 2001 From: mihaiitdata Date: Mon, 23 Feb 2026 23:01:46 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=AD=20Add=20stealth=20oper=20support?= =?UTF-8?q?=20for=20KILL=20messages=20=F0=9F=94=AA=20FEATURE=20NOU:=20Ascu?= =?UTF-8?q?nde=20nickname=20stealth=20oper=20=C3=AEn=20mesajele=20de=20KIL?= =?UTF-8?q?L=20C=C3=A2nd=20un=20oper=20stealth=20(IsHideOper=20=3D=20TRUE)?= =?UTF-8?q?=20face=20/KILL,=20nickname-ul=20lui=20NU=20mai=20apare=20?= =?UTF-8?q?=C3=AEn=20mesaje!=20=F0=9F=93=8A=20MODIFIC=C4=82RI:=20=C3=8En?= =?UTF-8?q?=20m=5Fkill.c=20-=20do=5Fkill():=201.=20Mesaj=20c=C4=83tre=20op?= =?UTF-8?q?eri=20(SNO=5FOPERKILL):=20=20=20=20=C3=8ENAINTE:=20'Received=20?= =?UTF-8?q?KILL=20from=20Radu2...'=20=20=20=20DUP=C4=82:=20'Received=20KIL?= =?UTF-8?q?L=20from=20*.UnderChat.org...'=202.=20Mesaj=20c=C4=83tre=20vict?= =?UTF-8?q?im=C4=83:=20=20=20=20=C3=8ENAINTE:=20'Killed=20by=20Radu2=20(re?= =?UTF-8?q?ason)'=20=20=20=20DUP=C4=82:=20'Killed=20by=20*.UnderChat.org?= =?UTF-8?q?=20(reason)'=203.=20Exit=20message:=20=20=20=20=C3=8ENAINTE:=20?= =?UTF-8?q?'***=20Radu2=20has=20killed=20user'=20=20=20=20DUP=C4=82:=20'**?= =?UTF-8?q?*=20*.UnderChat.org=20has=20killed=20user'=20=F0=9F=8E=AF=20LOG?= =?UTF-8?q?IC=C4=82:=20int=20hide=5Fkiller=20=3D=20feature=5Fbool(FEAT=5FH?= =?UTF-8?q?IS=5FKILLWHO)=20||=20IsHideOper(sptr);=20Ascunde=20nickname=20d?= =?UTF-8?q?ac=C4=83:=20-=20FEAT=5FHIS=5FKILLWHO=20=3D=20TRUE=20(hiding=20g?= =?UTF-8?q?lobal=20activat)=20-=20SAU=20IsHideOper(sptr)=20=3D=20TRUE=20(o?= =?UTF-8?q?per=20stealth)=20Rezultat:=20-=20Operi=20normali:=20Nickname=20?= =?UTF-8?q?vizibil=20-=20Operi=20stealth:=20*.UnderChat.org=20(sau=20FEAT?= =?UTF-8?q?=5FHIS=5FSERVERNAME)=20=E2=9C=85=20BENEFICII:=20-=20Stealth=20o?= =?UTF-8?q?per=20r=C4=83m=C3=A2ne=20complet=20ascuns=20-=20Investiga=C8=9B?= =?UTF-8?q?ii=20undercover=20f=C4=83r=C4=83=20expunere=20-=20Users=20v?= =?UTF-8?q?=C4=83d=20doar=20server=20name,=20nu=20cine=20a=20f=C4=83cut=20?= =?UTF-8?q?kill=20=F0=9F=94=92=20SECURITATE:=20-=20Logs=20p=C4=83streaz?= =?UTF-8?q?=C4=83=20info=20complet=C4=83=20(pentru=20admini)=20-=20Doar=20?= =?UTF-8?q?mesajele=20publice=20ascund=20nickname-ul=20-=20Operi=20cu=20di?= =?UTF-8?q?splay=3Dyes=20v=C4=83d=20info=20normal=C4=83=20Testing:=20Compi?= =?UTF-8?q?leaz=C4=83=20f=C4=83r=C4=83=20erori?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ircd/m_kill.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/ircd/m_kill.c b/ircd/m_kill.c index c0ba49f..e028c81 100644 --- a/ircd/m_kill.c +++ b/ircd/m_kill.c @@ -117,10 +117,13 @@ static int do_kill(struct Client* cptr, struct Client* sptr, * * Note: "victim->name" is used instead of "user" because we may * have changed the target because of the nickname change. + * + * Pentru stealth oper (IsHideOper), ascunde nickname-ul în mesaj */ sendto_opmask_butone(0, IsServer(sptr) ? SNO_SERVKILL : SNO_OPERKILL, "Received KILL message for %s from %s Path: %s!%s %s", - get_client_name(victim, SHOW_IP), cli_name(sptr), + get_client_name(victim, SHOW_IP), + IsHideOper(sptr) ? feature_str(FEAT_HIS_SERVERNAME) : cli_name(sptr), inpath, path, msg); log_write_kill(victim, sptr, inpath, path, msg); @@ -149,14 +152,20 @@ static int do_kill(struct Client* cptr, struct Client* sptr, * anyway (as this user don't exist there any more either) * In accordance with the new hiding rules, the victim * always sees the kill as coming from me. + * Pentru stealth oper (IsHideOper), ascunde nickname-ul */ - if (MyConnect(victim)) - sendcmdto_one(feature_bool(FEAT_HIS_KILLWHO) ? &his : sptr, CMD_KILL, - victim, "%C :%s %s", victim, feature_bool(FEAT_HIS_KILLWHO) + if (MyConnect(victim)) { + int hide_killer = feature_bool(FEAT_HIS_KILLWHO) || IsHideOper(sptr); + sendcmdto_one(hide_killer ? &his : sptr, CMD_KILL, + victim, "%C :%s %s", victim, hide_killer ? feature_str(FEAT_HIS_SERVERNAME) : cli_name(sptr), msg); - return exit_client_msg(cptr, victim, feature_bool(FEAT_HIS_KILLWHO) + } + + /* Exit message - ascunde nickname pentru stealth oper */ + int hide_killer = feature_bool(FEAT_HIS_KILLWHO) || IsHideOper(sptr); + return exit_client_msg(cptr, victim, hide_killer ? &me : sptr, "Killed (%s %s)", - feature_bool(FEAT_HIS_KILLWHO) ? + hide_killer ? feature_str(FEAT_HIS_SERVERNAME) : cli_name(sptr), msg); }