Including IP and hostname in other client connection status messages #764

Open
opened 2026-10-05 04:43:21 +02:00 by adam · 1 comment
Owner

The messages which appear when other clients connect / disconnect to the account you're logged in as could do with a little more detail, I think.

In particular:

14:19 <*status> Another client authenticated as your user. Use the 'ListClients' command to 
                see all 7 clients.

I think it would be most helpful if this one contained the IP they just connected from, so you can immediately see if it's one you expect. At least when a session disconnects you do get the IP:

14:19 -*status(znc@znc.in)- *** bigpresh detached (from 149.254.234.247)

In both cases, though, I think a reverse DNS lookup and including the hostname (if any) would be very useful, too - again, for quick eyeballing "yes, that's expected" vs "wait, what? A connection from some random other ISP/country?!".

The messages which appear when other clients connect / disconnect to the account you're logged in as could do with a little more detail, I think. In particular: ``` 14:19 <*status> Another client authenticated as your user. Use the 'ListClients' command to see all 7 clients. ``` I think it would be most helpful if this one contained the IP they just connected from, so you can immediately see if it's one you expect. At least when a session disconnects you do get the IP: ``` 14:19 -*status(znc@znc.in)- *** bigpresh detached (from 149.254.234.247) ``` In both cases, though, I think a reverse DNS lookup and including the hostname (if any) would be very useful, too - again, for quick eyeballing "yes, that's expected" vs "wait, what? A connection from some random other ISP/country?!". <!-- github-sync-id:223105036 -->
Author
Owner

14:19 -*status(znc@znc.in)- *** bigpresh detached (from 149.254.234.247)

That message is not from "ZNC itself", but from the notify_connect module. That module should also give you a message when a client connects and that message should also contain the IP. Is notify_connect broken?

https://github.com/znc/znc/blob/c0c6705f5d7050c60ac486cfaca934e671b382c6/modules/notify_connect.cpp

a reverse DNS lookup and including the hostname (if any)

If only we had a nice API for that. :-(
On some systems ZNC still does blocking DNS, I think. Also, the current abstraction layer only does hostname->IP and can only be used when a connection is to be established, I think...

> 14:19 -*status(znc@znc.in)- *** bigpresh detached (from 149.254.234.247) That message is not from "ZNC itself", but from the `notify_connect` module. That module should also give you a message when a client connects and that message should also contain the IP. Is `notify_connect` broken? https://github.com/znc/znc/blob/c0c6705f5d7050c60ac486cfaca934e671b382c6/modules/notify_connect.cpp > a reverse DNS lookup and including the hostname (if any) If only we had a nice API for that. :-( On some systems ZNC still does blocking DNS, I think. Also, the current abstraction layer only does hostname->IP and can only be used when a connection is to be established, I think... <!-- github-comment-id:295784796 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#764