|
From: Lo?c C. <lo...@us...> - 2001-04-15 18:52:59
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands
In directory usw-pr-cvs1:/tmp/cvs-serv12255/chat/lib/commands
Modified Files:
whois.cmd.php3
Log Message:
Hostname is now displayed after IP
Index: whois.cmd.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/whois.cmd.php3,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** whois.cmd.php3 2001/04/13 11:42:08 1.3
--- whois.cmd.php3 2001/04/15 18:52:55 1.4
***************
*** 57,62 ****
{
if (substr($ip, 0, 1) == 'p')
! $ip = substr($ip, 1) . ' (proxy)';
! $error .= '\n' . sprintf(L_NONREG_USER_IP, $ip);
}
$dbLink->cleanResults();
--- 57,69 ----
{
if (substr($ip, 0, 1) == 'p')
! {
! $ip = substr($ip, 1);
! $ipProxyStr = ' (proxy)';
! }
! $hostname = @gethostbyaddr($ip);
! $ipString = $ip
! . ((isset($ipProxyStr)) ? $ipProxyStr : '')
! . (($hostname) ? ' - ' . $hostname : '');
! $error .= '\n' . sprintf(L_NONREG_USER_IP, $ipString);
}
$dbLink->cleanResults();
***************
*** 70,73 ****
--- 77,81 ----
$nickForUrl = urlencode($cmd[1]);
$winName = 'whois_popup_' . md5($cmd[1]);
+ $winHeight = (@gethostbyaddr('127.0.0.1')) ? 260 : 240;
$whoisUrl = 'whois_popup.' . C_EXTENSION
. '?' . dbSessionSID('GET')
***************
*** 78,82 ****
'<!--',
'// Lauch the whois popup',
! 'window.open(\'' . $whoisUrl . '\', \'' . $winName . '\', \'width=420,height=240,resizable=yes,scrollbars=yes\');',
'// -->',
'</script>'
--- 86,90 ----
'<!--',
'// Lauch the whois popup',
! 'window.open(\'' . $whoisUrl . '\', \'' . $winName . '\', \'width=420,height=' . $winHeight . ',resizable=yes,scrollbars=yes\');',
'// -->',
'</script>'
|