Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Kick_IP function  (Read 3187 times)

0 Members and 0 Guests are viewing this topic.

Torchwood

« on: 07, February 2012, 21:04:33 »

We have this code in places:
Code: [Select]
if ((pl = find_player(name)))
    kick_player(pl);

Is there an equivalent for IP addresses?

i.e. given an IP address (which could include * characters to cover multiple addresses), can we easily kick all players on that IP address?

smacky

« Reply #1 on: 08, February 2012, 15:08:39 »
This is what the overly complex ipcompare.c does. Well actually not quite; it's both overly complex and inflexible. A nice rewrite so we had a find_ip() along the lines of find_player() would be good.

It is a bit trickier though as multiple players or rather sockets may be associated with one IP (range) so presumably rather than returning a pointer to an existing one of these structures find_ip() should create and return it's own temp linked list to a structure of all the matches it finds.

Tags:
 

Related Topics

  Subject / Started by Replies Last post
12 Replies
1961 Views
Last post 02, May 2006, 03:43:32
by Finn_mchool
9 Replies
2763 Views
Last post 11, September 2007, 18:51:39
by Nobbit
4 Replies
4458 Views
Last post 09, May 2008, 14:39:28
by smacky
11 Replies
3027 Views
Last post 31, July 2008, 18:52:00
by bajki
19 Replies
7587 Views
Last post 25, June 2009, 00:01:00
by grommit