tekniko has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl #telnet to port 2323 sub p{print@_}$SIG{CHLD}=sub{wait};socket S,2,2,6;bind S,pack(Snx12,2, +2323); listen S,5;while(accept C,S){if(!fork){open(STDOUT,">&C");p"name:";$n= +substr <C>,0,-2;$f=fork||exec"tail -f chatlog";open W,">>chatlog";select(W);$ +|=1;p "[$n here]\r\n";while(<C>){p"$n> $_";}p"[$n gone]\r\n";kill 15,$f;exit +}}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mini-IRCd
by c-era (Curate) on Jul 20, 2001 at 18:42 UTC |