package default; use vars qw/$standardheader/; use strict; $standardheader = <<'EOF'; EOF sub new { return bless {}; } sub exists { return 1 if defined &{__PACKAGE__ . '::' . $_[1]}; } sub makeline { my($self, $type, $target, $html) = @_; return "$html
\n"; } sub lines { my($self, @lines); unless(print @lines) { $::needtodie++; } } sub header { print "\n"; } sub keepalive { unless(print "\r\n") { $::needtodie++; } } sub error { my($self, $error) = @_; $self->line({}, '', $error); } sub form { 'DUMMY' } sub add { 'DUMMY' } sub del { 'DUMMY' } sub clear { 'DUMMY' } sub end { 'DUMMY' } sub options { 'DUMMY' } sub setoption { 'DUMMY' } # not supported by default interface sub ctcpping { 0 } sub ping { 0 } sub login { my($self, $this, $interface, $copy, $config, $order, $items, $adv) = @_; my $notsupported = 0; # Seems to work on Safari 2 (WebKit >=4xx): # http://developer.apple.com/internet/safari/uamatrix.html if ($ENV{HTTP_USER_AGENT} =~ /konqueror.2|Mozilla\/4.\d+ \[|OmniWeb|Safari\/(\d{2}|[1-3]\d{2})(\D|$)|Mozilla\/4.\d+ .*Mac_PowerPC/i) { $notsupported++; } print < CGI:IRC Login EOF if($notsupported) { print "This web-based IRC interface probably won't work well or at all with your browser.\n
You could try a non web-based IRC client or a browser such as Mozilla Firefox.

\n"; } print < EOF print "\n"; print < CGI:IRC Login EOF for(@$order) { my $item = $$items{$_}; next unless defined $item; print "$_"; if(ref $item eq 'ARRAY') { s/ /_/g; print "\n\n"; }elsif($item eq '-PASSWORD-') { print ""; }else{ my $tmp = ''; if($item =~ s/^-DISABLED- //) { $tmp = " disabled=\"1\""; } print ""; } print "\n"; } print < EOF if($adv) { print <Advanced.. EOF } print < $copy EOF } sub reconnect { my($self, $url, $text) = @_; return "$text"; } 1;