Name: Anonymous 2011-02-16 17:39
telnet 98.255.132.66 9099
Come join the fun!
Come join the fun!
#!/usr/bin/perl
use 5.008001;
use base 'Net::Server::Multiplex';
sub mux_input {
my ($self, $mux, $fh, $inbuf) = @_;
while ($$inbuf =~ s/^(.*?)\r?\n//) {
if ($1 eq "/quit") {
$mux->close($fh);
} else {
my $bcast = $self->{peeraddr}.': '.$1."\r\n";
for my $client ($mux->handles) {
$mux->write($client, $bcast) unless $client == $fh;
}
}
}
}
run main port => 9099