🎭 Add stealth oper support for KILL messages

🔪 FEATURE NOU: Ascunde nickname stealth oper în mesajele de KILL
Când un oper stealth (IsHideOper = TRUE) face /KILL,
nickname-ul lui NU mai apare în mesaje!
📊 MODIFICĂRI:
În m_kill.c - do_kill():
1. Mesaj către operi (SNO_OPERKILL):
   ÎNAINTE: 'Received KILL from Radu2...'
   DUPĂ: 'Received KILL from *.UnderChat.org...'
2. Mesaj către victimă:
   ÎNAINTE: 'Killed by Radu2 (reason)'
   DUPĂ: 'Killed by *.UnderChat.org (reason)'
3. Exit message:
   ÎNAINTE: '*** Radu2 has killed user'
   DUPĂ: '*** *.UnderChat.org has killed user'
🎯 LOGICĂ:
int hide_killer = feature_bool(FEAT_HIS_KILLWHO) || IsHideOper(sptr);
Ascunde nickname dacă:
- FEAT_HIS_KILLWHO = TRUE (hiding global activat)
- SAU IsHideOper(sptr) = TRUE (oper stealth)
Rezultat:
- Operi normali: Nickname vizibil
- Operi stealth: *.UnderChat.org (sau FEAT_HIS_SERVERNAME)
 BENEFICII:
- Stealth oper rămâne complet ascuns
- Investigații undercover fără expunere
- Users văd doar server name, nu cine a făcut kill
🔒 SECURITATE:
- Logs păstrează info completă (pentru admini)
- Doar mesajele publice ascund nickname-ul
- Operi cu display=yes văd info normală
Testing: Compilează fără erori
This commit is contained in:
mihaiitdata 2026-02-23 23:01:46 +02:00
parent 3e6d2b4f1d
commit b18d533546
1 changed files with 15 additions and 6 deletions

View File

@ -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 * Note: "victim->name" is used instead of "user" because we may
* have changed the target because of the nickname change. * 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, sendto_opmask_butone(0, IsServer(sptr) ? SNO_SERVKILL : SNO_OPERKILL,
"Received KILL message for %s from %s Path: %s!%s %s", "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); inpath, path, msg);
log_write_kill(victim, 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) * anyway (as this user don't exist there any more either)
* In accordance with the new hiding rules, the victim * In accordance with the new hiding rules, the victim
* always sees the kill as coming from me. * always sees the kill as coming from me.
* Pentru stealth oper (IsHideOper), ascunde nickname-ul
*/ */
if (MyConnect(victim)) if (MyConnect(victim)) {
sendcmdto_one(feature_bool(FEAT_HIS_KILLWHO) ? &his : sptr, CMD_KILL, int hide_killer = feature_bool(FEAT_HIS_KILLWHO) || IsHideOper(sptr);
victim, "%C :%s %s", victim, feature_bool(FEAT_HIS_KILLWHO) sendcmdto_one(hide_killer ? &his : sptr, CMD_KILL,
victim, "%C :%s %s", victim, hide_killer
? feature_str(FEAT_HIS_SERVERNAME) : cli_name(sptr), msg); ? 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)", ? &me : sptr, "Killed (%s %s)",
feature_bool(FEAT_HIS_KILLWHO) ? hide_killer ?
feature_str(FEAT_HIS_SERVERNAME) : cli_name(sptr), feature_str(FEAT_HIS_SERVERNAME) : cli_name(sptr),
msg); msg);
} }