From accf74f3a14dad1b474ddaeaffe8e49145fd376c Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 21 Nov 2010 22:15:48 +0000 Subject: [PATCH] [TASK] Added a plugin that would have been ignored otherwise. --- commands/#botted.channel.php | 30 ++++++++++++++++++++++++++++++ commands/ipcs[][lastcheck] | 0 commands/ipcs[][status] | 0 3 files changed, 30 insertions(+) create mode 100644 commands/#botted.channel.php delete mode 100644 commands/ipcs[][lastcheck] delete mode 100644 commands/ipcs[][status] diff --git a/commands/#botted.channel.php b/commands/#botted.channel.php new file mode 100644 index 0000000..afb6e2a --- /dev/null +++ b/commands/#botted.channel.php @@ -0,0 +1,30 @@ + ipcs AS $ip => $data){ + if(time() - $data["lastcheck"] > 10){ + $result = ping_ip($ip); + $status = ($result) ? "Online" : "Offline"; + if($data["status"] != $result) $this -> call("privmsg", "#botted", "[".$ip."] Status: ".$status); + $this -> ipcs[$ip]["status"] = $result; + $this -> ipcs[$ip]["lastcheck"] = time(); + } +} + +?> diff --git a/commands/ipcs[][lastcheck] b/commands/ipcs[][lastcheck] deleted file mode 100644 index e69de29..0000000 diff --git a/commands/ipcs[][status] b/commands/ipcs[][status] deleted file mode 100644 index e69de29..0000000