Public Member Functions | Protected Attributes

log2command_ip_monitor Class Reference

Keeps track of IP's. More...

Inheritance diagram for log2command_ip_monitor:
log2command_base

List of all members.

Public Member Functions

 add ($ip)
 Add an IP to the monitor.
 exists ($ip)
 Does the IP exist in our databse?
 find_old ($timeout=false)
 Finds IPs in the database that haven't been touched in $timeout seconds.
 remove ($ip)
 Remove an IP from the monitor.
 touch ($ip)
 Touch an IP address (= mark it as used / seen).

Protected Attributes

 $ips = array()

Detailed Description

Keeps track of IP's.

Author:
Edward Plainview <it@sverigedemokraterna.se>

Member Function Documentation

add ( ip  ) 

Add an IP to the monitor.

Parameters:
$ip IP address.
exists ( ip  ) 

Does the IP exist in our databse?

Parameters:
$ip IP address.
Returns:
True, if the IP is known in our database.
find_old ( timeout = false  ) 

Finds IPs in the database that haven't been touched in $timeout seconds.

Parameters:
$timeout How old an IP must be to be considered old.
Returns:
Array of {log2command_ip_monitor_ip}s.
remove ( ip  ) 

Remove an IP from the monitor.

Parameters:
$ip IP address.

Member Data Documentation

$ips = array() [protected]

Array of $ips.


The documentation for this class was generated from the following file:
 All Classes Functions Variables