phpircbot2/commands/dns.prefix.php
Jan Philipp Timme 6b39d44754 Initial import.
2010-11-21 22:13:54 +00:00

8 lines
387 B
PHP

<?php
#BOT_INCLUDE "dns" "prefix" "1"
$data = $this -> protocol -> getArgs(1, $recv);
if(trim($data) == "") $data = $recv["iphost"];
$host = gethostbyaddr($data);
if($host == $data || $host == "") $this -> call("privmsg", $recv["origin"], $recv["nick"].", your ip could not be resolved.");
else $this -> call("privmsg", $recv["origin"], $recv["nick"].", your host is: ".$host);
?>