client.cgi (C version)
Compiling the client.cgi and using it rather than the client-perl.cgi can give a speed gain, because C programs don't need to be compiled each time they run like perl. You will
need shell access to your system to compile it.
Run this at a shell prompt in the CGI:IRC cgi-bin directory:
gcc -o client.cgi client.c
This shouldn't print any errors, and you should have a client.cgi program, if you try typing
at the command prompt you should get a few lines of
output that end in, "No input found". Once it's compiled you simply need to change script_form in cgiirc.config from client-perl.cgi to client.cgi.
The identd lets a user be idented to a hex encoded version of their IP address eg: [email protected]
(this decodes to 192.168.2.2), you can use the included
decode.pl to decode an IP address (or work out the hex yourself :). It makes
banning on the host possible at channel and server level, which makes it much
easier to allow more unrestricted access to CGI:IRC. To set-up the identd.pl
you need root access to the system where you have installed CGI:IRC.
The identd.pl requires you to be using an inetd, i have used it with inetd but
people report it works with xinetd too.
To install it, copy the identd.pl file to /usr/local/sbin (or any other
suitable location). Make sure it is set chmod 755 and the path to perl is
correct, add the following to /etc/inetd.conf:
ident stream tcp nowait nobody /usr/local/sbin/identd.pl
You might also need to change nobody to the user CGI scripts run as on the
server - this provides slight protection from local spoofing by checking the
user is correct. You can check it's set-up correctly by running
- press enter and it should print something like INVALID
This should work, but no other identd lookups will work - you can change the
reply variable in identd.pl to enable other lookups. Set to
ident all other requests as "text" (similar to nullidentd).
simply uses /proc/net/tcp to do full ident lookups on linux.
forwards to the identd running on a different local port; this apparently works well with oidentd running with the proxy option.
Displaying a user's real host
You will need to have control of your own ircd to be able to do this.
There are several ways of achieving this, the way that works best with CGI:IRC is patching your ircd to allow
spoofing of hosts, currently this only exists in the IRCD used by Blitzed
The way the Blitzed patch works is you add an I: line with a password of CGIIRC
to match the hostmask that the connection from the server running CGI:IRC comes from. This will then read the
hostname from CGI:IRC (with the realhost_as_password option enabled in cgiirc.config). Other ways include
using the SETHOST or CHGHOST command found in some IRCDs combined with a bot, however this isn't very useful
as bans don't always work correctly with this method (dependant on IRCD).
This little program works in a similar way to 'who', it provides a list of
users logged in and where they are connected from and to.
$Id: advanced.php,v 1.5 2004/06/08 23:36:02 dgl Exp $