operserv: NOTIFY lines carry real IP, rdns, login and origin server for the oper feed
All checks were successful
CI / check (push) Successful in 4m4s
All checks were successful
CI / check (push) Successful in 4m4s
This commit is contained in:
parent
2fb1970030
commit
4d327c3f47
2 changed files with 24 additions and 3 deletions
|
|
@ -5408,8 +5408,9 @@ fn notify_hook_emits_feed_for_watched_user() {
|
|||
let out = e.handle(NetEvent::UserAttrs { uid: "000AAAAAC".into(), ident: "x".into(), realhost: "h".into(), gecos: "g".into() });
|
||||
assert!(
|
||||
out.iter().any(|a| matches!(a, NetAction::Privmsg { from, to, text }
|
||||
if from == "42SAAAAAO" && to == "#services" && text.contains("[NOTIFY]") && text.contains("connected"))),
|
||||
"expected a NOTIFY connect line, got {out:?}"
|
||||
if from == "42SAAAAAO" && to == "#services" && text.contains("[NOTIFY]") && text.contains("connected")
|
||||
&& text.contains("1.2.3.4"))), // the real IP is carried, not just the cloak
|
||||
"expected a NOTIFY connect line with the real IP, got {out:?}"
|
||||
);
|
||||
// A clean user draws nothing.
|
||||
e.handle(NetEvent::UserConnect { uid: "000AAAAAD".into(), nick: "nice".into(), host: "h".into(), ip: "9.9.9.9".into() });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue