s2s: route and apply KILL across the link (inbound handler + remote-target routing)
This commit is contained in:
parent
579c321670
commit
98fb848b8c
2 changed files with 46 additions and 0 deletions
|
|
@ -179,6 +179,16 @@ impl Command for Kill {
|
|||
.cloned()
|
||||
.unwrap_or_else(|| "Killed".to_string());
|
||||
let Some(tuid) = s.find_nick(target) else {
|
||||
// remote target: route the KILL toward the server that owns it
|
||||
if let Some((uuid, _)) = s.find_remote(target) {
|
||||
let (killer_uuid, killer) = s
|
||||
.users
|
||||
.get(&uid)
|
||||
.map(|u| (u.uuid.clone(), u.nick.clone()))
|
||||
.unwrap_or_default();
|
||||
s.route_kill(&killer_uuid, &uuid, &format!("{killer} ({reason})"));
|
||||
return CmdResult::Ok;
|
||||
}
|
||||
s.numeric(
|
||||
uid,
|
||||
ERR_NOSUCHNICK,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue