Fix bug #45: [Request] Whoip command.

Rewrote patches from Zoltan to support ip ranges and multiple results per IP.
Needed to make sure IPv6 mapped IPv4 addresses were converted to proper IPv4 addresses after accept().
This commit is contained in:
Jan Vidar Krey
2009-07-26 04:02:14 +02:00
parent 041ce7a1fb
commit 6358c7f9cd
4 changed files with 79 additions and 2 deletions

View File

@@ -99,6 +99,13 @@ extern struct hub_user* uman_get_user_by_cid(struct hub_info* hub, const char* c
*/
extern struct hub_user* uman_get_user_by_nick(struct hub_info* hub, const char* nick);
/**
* Lookup users based on an ip address range.
*
* @return The number of users matching the addressess, or -1 on error (mask is wrong).
*/
extern size_t uman_get_user_by_addr(struct hub_info* hub, struct linked_list* users, struct ip_range* range);
/**
* Send the user list of connected clients to 'user'.
* Usually part of the login process.