pastebot-cvs Mailing List for pastebot
Status: Beta
Brought to you by:
rcaputo
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(12) |
Jun
(6) |
Jul
(2) |
Aug
|
Sep
|
Oct
(14) |
Nov
(3) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(11) |
Jul
(4) |
Aug
|
Sep
|
Oct
(16) |
Nov
(22) |
Dec
(6) |
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
(10) |
Oct
|
Nov
(2) |
Dec
|
|
From: <rc...@us...> - 2004-11-01 16:08:56
|
Update of /cvsroot/pastebot/pastebot/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21117/Util Modified Files: Conf.pm Log Message: Improve error messages, especially ones surrounding bad configuration files. Index: Conf.pm =================================================================== RCS file: /cvsroot/pastebot/pastebot/Util/Conf.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Conf.pm 9 Sep 2004 03:12:53 -0000 1.11 --- Conf.pm 1 Nov 2004 16:08:42 -0000 1.12 *************** *** 61,64 **** --- 61,66 ---- sub flush_section { + my $cfile = shift; + if (defined $section) { *************** *** 68,72 **** if ($item_type & REQUIRED) { die( ! "section `$section' ", "requires item `$item_name' ", "at $cfile line $section_line\n" --- 70,74 ---- if ($item_type & REQUIRED) { die( ! "conf error: section `$section' ", "requires item `$item_name' ", "at $cfile line $section_line\n" *************** *** 76,81 **** die( ! "section `$section' ", ! "item `$item{name}' is redefined at $section_line\n" ) if exists $config{$item{name}}; --- 78,83 ---- die( ! "conf error: section `$section' ", ! "item `$item{name}' is redefined at $cfile line $section_line\n" ) if exists $config{$item{name}}; *************** *** 103,110 **** unless ( $cfile and -f $cfile ) { ! die "\n$0: Cannot read configuration file [$cfile], tried: @conf"; } ! open(MPH, "<$cfile") or die "config file [$cfile] $!"; while (<MPH>) { chomp; --- 105,114 ---- unless ( $cfile and -f $cfile ) { ! die "\nconf error: Cannot read configuration file [$cfile], tried: @conf"; } ! open(MPH, "<$cfile") or ! die "\nconf error: Cannot open configuration file [$cfile]: $!"; ! while (<MPH>) { chomp; *************** *** 116,125 **** die( ! "cannot use an indented item ($1) outside of an unindented section ", "at $cfile line $.\n" ) unless defined $section; die( ! "item `$item' does not belong in section `$section' ", "at $cfile line $.\n" ) unless exists $define{$section}->{$1}; --- 120,130 ---- die( ! "conf error: ", ! "can't use an indented item ($1) outside of an unindented section ", "at $cfile line $.\n" ) unless defined $section; die( ! "conf error: item `$1' does not belong in section `$section' ", "at $cfile line $.\n" ) unless exists $define{$section}->{$1}; *************** *** 130,134 **** } else { ! die "option $1 redefined at $cfile line $.\n"; } } --- 135,139 ---- } else { ! die "conf error: option $1 redefined at $cfile line $.\n"; } } *************** *** 148,152 **** # A new section ends the previous one. ! &flush_section(); $section = $1; --- 153,157 ---- # A new section ends the previous one. ! flush_section($cfile); $section = $1; *************** *** 164,171 **** } ! die "syntax error in $cfile at line $.\n"; } ! &flush_section(); close MPH; --- 169,176 ---- } ! die "conf error: syntax error in $cfile at line $.\n"; } ! flush_section($cfile); close MPH; |
|
From: <rc...@us...> - 2004-11-01 16:08:50
|
Update of /cvsroot/pastebot/pastebot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21117 Modified Files: pastebot.perl Log Message: Improve error messages, especially ones surrounding bad configuration files. Index: pastebot.perl =================================================================== RCS file: /cvsroot/pastebot/pastebot/pastebot.perl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pastebot.perl 9 Sep 2004 03:12:53 -0000 1.9 --- pastebot.perl 1 Nov 2004 16:08:41 -0000 1.10 *************** *** 36,54 **** ); - sub Error ($ $) { - my ($lib, $msg) = @_; - - $msg =~ s/ in \@INC.*//s; - - my $liberr = << "EOF"; - $0 Error while loading $lib: $msg - Please make sure that the following libraries - have been installed: - @LIBS - EOF - - die "While loading library [$lib]\n$liberr"; - } - sub LoadLibraries () { push @INC, dirname $0; --- 36,39 ---- *************** *** 65,69 **** eval "use $lib;" ; ! $@ and Error($lib, $@); } } --- 50,64 ---- eval "use $lib;" ; ! next unless $@; ! ! if ($@ =~ /Can't locate (\S+) in \@INC/) { ! die "Can't find library $1. Please ensure it is installed.\n"; ! } ! ! if ($@ =~ /(conf error: .*? line \d+)/) { ! die "$1\n"; ! } ! ! die; } } *************** *** 72,73 **** --- 67,82 ---- POE::Kernel->run(); exit 0; + + sub HELP_MESSAGE { + my $output = shift; + + print $output "usage:\n"; + print $output " $0 (use pastebot.conf for configuration)\n"; + print $output " $0 -f filename (read a particular configuration file)\n"; + exit; + } + + sub VERSION_MESSAGE { + my $output = shift; + print $output "$0 development snapshot\n"; + } |
|
From: <rc...@us...> - 2004-09-09 04:00:56
|
Update of /cvsroot/pastebot/pastebot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19663 Modified Files: TODO Log Message: Migrate some of the TODO items into the SourceForge trackers. Comment on this in the TODO file so people know where to look. Index: TODO =================================================================== RCS file: /cvsroot/pastebot/pastebot/TODO,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TODO 13 Feb 2004 17:04:28 -0000 1.10 --- TODO 9 Sep 2004 04:00:44 -0000 1.11 *************** *** 1,4 **** --- 1,17 ---- $Id$ + --------------------------- + Migrating to a Real Tracker + --------------------------- + + This list is shrinking, but Real Work is not being done! Rather, the + missing ideas have been entered into Pastebot's trackers at + SourceForge. You can enter your favorite bug reports and wishes at + http://sourceforge.net/projects/pastebot ... and you can keep track of + the status of the project. + + If you're feeling adventurous, you can also submit patches and new + features through the patch tracker. We love your patches, yes we do! + ------------------------------------ Recent, Miscellaneous, Uncategorized *************** *** 156,170 **** one-time keys. - ---------------------------- - Pretty up the web interface. - ---------------------------- - - Replace the main page with a nice title/credits page. - - Add a browsable index of public (to-channel) pastes. This could be - construed as a security hole. - - Highlight different kinds of syntax; not just Perl. - ------------- Web accounts. --- 169,172 ---- *************** *** 182,192 **** IP address. - ----------- - Admin list. - ----------- - - Keep a database of bot admins separate from channel ops. This will be - nontrivial. - --------------------- Paste Via Form Upload --- 184,187 ---- *************** *** 199,209 **** crappy HTML renderers. - -------------- - Non-text Paste - -------------- - - Allow images and things to be uploaded/pasted. Requires "paste via - form upload" and the ability to detect and/or specify content types. - --------------- Paste Via Email --- 194,197 ---- *************** *** 270,279 **** make visible changes easier. - *** Make the bot a proper daemon. - - Do the daemonize thing so it runs stand-alone. - - Optionally have the daemon run as a specific user. - *** Make databases persistent. --- 258,261 ---- |
|
From: <rc...@us...> - 2004-09-09 03:13:04
|
Update of /cvsroot/pastebot/pastebot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12199 Modified Files: pastebot.perl Log Message: Tweak the modules search paths. Index: pastebot.perl =================================================================== RCS file: /cvsroot/pastebot/pastebot/pastebot.perl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pastebot.perl 8 Sep 2004 18:49:44 -0000 1.8 --- pastebot.perl 9 Sep 2004 03:12:53 -0000 1.9 *************** *** 22,37 **** # Places where the libraries may be found. my @CONFIG_FILE = qw( $HOME/.pastebot.lib /etc/pastebot/pastebot.lib /usr/local/etc/pastebot/pastebot.lib - . ); # Libraries we need. my @LIBS = qw( ! Perl::Tidy POE Server::Web - Client::IRC ); --- 22,37 ---- # Places where the libraries may be found. my @CONFIG_FILE = qw( + ./pastebot.lib $HOME/.pastebot.lib /etc/pastebot/pastebot.lib /usr/local/etc/pastebot/pastebot.lib ); # Libraries we need. my @LIBS = qw( ! Client::IRC POE + Perl::Tidy Server::Web ); |
|
From: <rc...@us...> - 2004-09-09 03:13:04
|
Update of /cvsroot/pastebot/pastebot/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12199/Util Modified Files: Conf.pm Data.pm Log Message: Tweak the modules search paths. Index: Conf.pm =================================================================== RCS file: /cvsroot/pastebot/pastebot/Util/Conf.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Conf.pm 8 Sep 2004 18:49:44 -0000 1.10 --- Conf.pm 9 Sep 2004 03:12:53 -0000 1.11 *************** *** 87,94 **** my %opts; getopts("f:", \%opts); ! my $cfile = $opts{"f"}; my $f = "pastebot.conf"; my @conf = ( ! "./$f", "$HOME/$f", "/etc/pastebot/$f", "/usr/local/etc/pastebot/$f" ); --- 87,94 ---- my %opts; getopts("f:", \%opts); ! my $cfile = $opts{"f"}; my $f = "pastebot.conf"; my @conf = ( ! "./$f", "$HOME/$f", "/usr/local/etc/pastebot/$f", "/etc/pastebot/$f" ); Index: Data.pm =================================================================== RCS file: /cvsroot/pastebot/pastebot/Util/Data.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Data.pm 13 Feb 2004 23:56:18 -0000 1.8 --- Data.pm 9 Sep 2004 03:12:53 -0000 1.9 *************** *** 266,270 **** my $dir = pastestore(); ! mkdir $dir unless -d $dir or die "mkdir $dir failed $!"; if (-e "$dir/Index") { --- 266,276 ---- my $dir = pastestore(); ! unless (-d $dir) { ! use File::Path; ! eval { mkpath $dir }; ! if ($@) { ! die "Couldn't create directory $dir: $@"; ! } ! } if (-e "$dir/Index") { |
|
From: <rc...@us...> - 2004-09-08 18:49:53
|
Update of /cvsroot/pastebot/pastebot/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23739/Util Modified Files: Conf.pm Log Message: Expand the install search paths. Index: Conf.pm =================================================================== RCS file: /cvsroot/pastebot/pastebot/Util/Conf.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Conf.pm 13 Feb 2004 23:56:18 -0000 1.9 --- Conf.pm 8 Sep 2004 18:49:44 -0000 1.10 *************** *** 13,19 **** use vars qw(@ISA @EXPORT %OPTS); @ISA = qw(Exporter); ! @EXPORT = qw( get_names_by_type ! get_items_by_name ! ); sub SCALAR () { 0x01 } --- 13,20 ---- use vars qw(@ISA @EXPORT %OPTS); @ISA = qw(Exporter); ! @EXPORT = qw( ! get_names_by_type ! get_items_by_name ! ); sub SCALAR () { 0x01 } *************** *** 21,59 **** sub REQUIRED () { 0x04 } ! my %define = ! ( web_server => ! { name => SCALAR | REQUIRED, ! iface => SCALAR, ! ifname => SCALAR, ! port => SCALAR | REQUIRED, ! irc => SCALAR | REQUIRED, ! proxy => SCALAR, ! iname => SCALAR, ! }, ! irc => ! { name => SCALAR | REQUIRED, ! server => LIST | REQUIRED, ! nick => LIST | REQUIRED, ! uname => SCALAR | REQUIRED, ! iname => SCALAR | REQUIRED, ! away => SCALAR | REQUIRED, ! flags => SCALAR, ! join_cfg_only => SCALAR, ! channel => LIST | REQUIRED, ! quit => SCALAR | REQUIRED, ! cuinfo => SCALAR | REQUIRED, ! cver => SCALAR | REQUIRED, ! ccinfo => SCALAR | REQUIRED, ! localaddr => SCALAR, ! }, ! pastes => ! { name => SCALAR | REQUIRED, ! check => SCALAR, ! expire => SCALAR, ! count => SCALAR, ! throttle => SCALAR, ! store => SCALAR | REQUIRED, ! }, ! ); my ($section, $section_line, %item, %config); --- 22,60 ---- sub REQUIRED () { 0x04 } ! my %define = ( ! web_server => { ! name => SCALAR | REQUIRED, ! iface => SCALAR, ! ifname => SCALAR, ! port => SCALAR | REQUIRED, ! irc => SCALAR | REQUIRED, ! proxy => SCALAR, ! iname => SCALAR, ! }, ! irc => { ! name => SCALAR | REQUIRED, ! server => LIST | REQUIRED, ! nick => LIST | REQUIRED, ! uname => SCALAR | REQUIRED, ! iname => SCALAR | REQUIRED, ! away => SCALAR | REQUIRED, ! flags => SCALAR, ! join_cfg_only => SCALAR, ! channel => LIST | REQUIRED, ! quit => SCALAR | REQUIRED, ! cuinfo => SCALAR | REQUIRED, ! cver => SCALAR | REQUIRED, ! ccinfo => SCALAR | REQUIRED, ! localaddr => SCALAR, ! }, ! pastes => { ! name => SCALAR | REQUIRED, ! check => SCALAR, ! expire => SCALAR, ! count => SCALAR, ! throttle => SCALAR, ! store => SCALAR | REQUIRED, ! }, ! ); my ($section, $section_line, %item, %config); *************** *** 66,76 **** if ($item_type & REQUIRED) { ! die "$section section needs a(n) $item_name item at $section_line\n" ! unless exists $item{$item_name}; } } ! die "$section section $item{name} is redefined at $section_line\n" ! if exists $config{$item{name}}; my $name = $item{name}; --- 67,82 ---- if ($item_type & REQUIRED) { ! die( ! "section `$section' ", ! "requires item `$item_name' ", ! "at $cfile line $section_line\n" ! ) unless exists $item{$item_name}; } } ! die( ! "section `$section' ", ! "item `$item{name}' is redefined at $section_line\n" ! ) if exists $config{$item{name}}; my $name = $item{name}; *************** *** 83,87 **** my $cfile = $opts{"f"}; my $f = "pastebot.conf"; ! my @conf = ("./$f", "$HOME/$f", "/etc/pastebot/$f"); unless ( $cfile ) { --- 89,95 ---- my $cfile = $opts{"f"}; my $f = "pastebot.conf"; ! my @conf = ( ! "./$f", "$HOME/$f", "/etc/pastebot/$f", "/usr/local/etc/pastebot/$f" ! ); unless ( $cfile ) { *************** *** 98,102 **** } - open(MPH, "<$cfile") or die "config file [$cfile] $!"; while (<MPH>) { --- 106,109 ---- *************** *** 108,116 **** if (/^\s+(\S+)\s+(.*?)\s*$/) { ! die "item outside a section at pastebot.conf line $.\n" ! unless defined $section; ! die "unknown $section item at pastebot.conf line $.\n" ! unless exists $define{$section}->{$1}; if (exists $item{$1}) { --- 115,127 ---- if (/^\s+(\S+)\s+(.*?)\s*$/) { ! die( ! "cannot use an indented item ($1) outside of an unindented section ", ! "at $cfile line $.\n" ! ) unless defined $section; ! die( ! "item `$item' does not belong in section `$section' ", ! "at $cfile line $.\n" ! ) unless exists $define{$section}->{$1}; if (exists $item{$1}) { *************** *** 119,123 **** } else { ! die "option $1 redefined at pastebot.conf line $.\n"; } } --- 130,134 ---- } else { ! die "option $1 redefined at $cfile line $.\n"; } } *************** *** 153,157 **** } ! die "syntax error in pastebot.conf at line $.\n"; } --- 164,168 ---- } ! die "syntax error in $cfile at line $.\n"; } |
|
From: <rc...@us...> - 2004-09-08 18:49:53
|
Update of /cvsroot/pastebot/pastebot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23739 Modified Files: pastebot.perl Log Message: Expand the install search paths. Index: pastebot.perl =================================================================== RCS file: /cvsroot/pastebot/pastebot/pastebot.perl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pastebot.perl 8 Sep 2004 15:51:20 -0000 1.7 --- pastebot.perl 8 Sep 2004 18:49:44 -0000 1.8 *************** *** 24,27 **** --- 24,28 ---- $HOME/.pastebot.lib /etc/pastebot/pastebot.lib + /usr/local/etc/pastebot/pastebot.lib . ); |
|
From: <rc...@us...> - 2004-09-08 16:46:20
|
Update of /cvsroot/pastebot/pastebot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31805 Modified Files: Makefile Log Message: Build the snapshot versions programmatically. Index: Makefile =================================================================== RCS file: /cvsroot/pastebot/pastebot/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile 8 Sep 2004 16:06:34 -0000 1.7 --- Makefile 8 Sep 2004 16:46:11 -0000 1.8 *************** *** 1,3 **** ! VERSION=`date +%Y%m%d` DISTNAME=pastebot-$(VERSION) DISTBUILD=$(DISTNAME) --- 1,3 ---- ! VERSION=$(shell date +%Y%m%d-%H%M%S) DISTNAME=pastebot-$(VERSION) DISTBUILD=$(DISTNAME) |
|
From: <rc...@us...> - 2004-09-08 16:06:43
|
Update of /cvsroot/pastebot/pastebot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24526 Modified Files: Makefile Log Message: Add the "tag" target for easy distributing. Index: Makefile =================================================================== RCS file: /cvsroot/pastebot/pastebot/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 8 Sep 2004 15:51:20 -0000 1.6 --- Makefile 8 Sep 2004 16:06:34 -0000 1.7 *************** *** 1,3 **** ! VERSION=20040908 DISTNAME=pastebot-$(VERSION) DISTBUILD=$(DISTNAME) --- 1,3 ---- ! VERSION=`date +%Y%m%d` DISTNAME=pastebot-$(VERSION) DISTBUILD=$(DISTNAME) *************** *** 121,122 **** --- 121,125 ---- mkmanifest: @perl -MExtUtils::Manifest=mkmanifest -e 'mkmanifest()' + + tag: + cvs tag -Rc snap$(VERSION) . |
|
From: <rc...@us...> - 2004-09-08 15:51:30
|
Update of /cvsroot/pastebot/pastebot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21395 Modified Files: MANIFEST MANIFEST.SKIP Makefile pastebot.perl Log Message: Cleaned up "make dist" somewhat. Still needs to build the snapshot date programmatically, though. Cleaned up "make install" somewhat. Removed the need for a separate pasetbot.lib.sample file. It's generated by Makefile now. Index: MANIFEST =================================================================== RCS file: /cvsroot/pastebot/pastebot/MANIFEST,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MANIFEST 13 Nov 2003 02:44:35 -0000 1.3 --- MANIFEST 8 Sep 2004 15:51:20 -0000 1.4 *************** *** 1,2 **** --- 1,4 ---- + # $Id$ + CHANGES COPYRIGHT Client/IRC.pm Index: MANIFEST.SKIP =================================================================== RCS file: /cvsroot/pastebot/pastebot/MANIFEST.SKIP,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MANIFEST.SKIP 31 Oct 2003 16:49:22 -0000 1.2 --- MANIFEST.SKIP 8 Sep 2004 15:51:20 -0000 1.3 *************** *** 1,12 **** \.tar\.gz$ \bCVS\b - ~$ - ^pastebot.conf$ - ^pastebot.conf-nopaste$ - /\.# ^\.# ! ^MANIFEST\.bak$ ! \.swp$ ! ^CHANGES$ ! \.orig$ pastestore --- 1,10 ---- + /\.# + \.bak$ + \.orig$ + \.swp$ \.tar\.gz$ \bCVS\b ^\.# ! pastebot.conf$ pastestore + ~$ Index: Makefile =================================================================== RCS file: /cvsroot/pastebot/pastebot/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 8 Sep 2004 15:10:40 -0000 1.5 --- Makefile 8 Sep 2004 15:51:20 -0000 1.6 *************** *** 1,3 **** ! VERSION=20031031 DISTNAME=pastebot-$(VERSION) DISTBUILD=$(DISTNAME) --- 1,3 ---- ! VERSION=20040908 DISTNAME=pastebot-$(VERSION) DISTBUILD=$(DISTNAME) *************** *** 32,50 **** ETCDIR = $(sysconfdir)/$(PACKAGE) ! TAR_OPT_EX = --exclude=CVS --exclude=*[~\#] --exclude *.conf *.orig patch.* *.bak dist: $(DISTTGZ) ! $(DISTTGZ): distdir changes ! if [ -e $(DISTTGZ) ] ; \ then echo $(DISTTGZ) already exists ; \ exit 1 ; \ fi ! tar cf $(DISTTAR) $(DISTBUILD) ! -perl -MExtUtils::Command -e rm_rf $(DISTBUILD) ! gzip $(DISTTAR) install-cpan: ! perl -MCPAN -e '\ @list = qw( \ HTTP::Request \ --- 32,51 ---- ETCDIR = $(sysconfdir)/$(PACKAGE) ! TAR_OPT_EX = --exclude=CVS --exclude=*[~\#] --exclude *.conf --exclude *.orig --exclude patch.* --exclude *.bak dist: $(DISTTGZ) ! $(DISTTGZ): distdir ! @if [ -e $(DISTTGZ) ] ; \ then echo $(DISTTGZ) already exists ; \ exit 1 ; \ fi ! @tar cf $(DISTTAR) $(DISTBUILD) ! @perl -MExtUtils::Command -e rm_rf $(DISTBUILD) ! @gzip $(DISTTAR) install-cpan: ! @echo '=== Installing and/or updating CPAN modules...' ! @perl -MCPAN -e '\ @list = qw( \ HTTP::Request \ *************** *** 62,88 **** install-etc: $(INSTALL) $(INSTALL_BIN) -d $(ETCDIR) ! if [ ! -d $(ETCDIR) ]; then exit 1; fi @if [ -f $(ETCDIR)/$(LIBFILE) ]; then \ ! echo "Not installing, file exists $(ETCDIR)/$(LIBFILE)"; \ else \ $(INSTALL) $(INSTALL_DATA) $(LIBSRC) $(ETCDIR)/$(LIBFILE); \ fi; @if [ -f $(ETCDIR)/$(CONFFILE) ]; then \ ! echo "Not installing, file exists $(ETCDIR)/$(CONFFILE)"; \ else \ $(INSTALL) $(INSTALL_DATA) $(CONFSRC) $(ETCDIR)/$(CONFFILE); \ fi; ! echo "You may need to edit files in $(ETCDIR)" install-store: $(INSTALL) $(INSTALL_BIN) -d $(PASTEDIR) install-lib: install-store $(INSTALL) $(INSTALL_BIN) -d $(DATADIR) ! if [ ! -d $(DATADIR) ]; then exit 1; fi ! tar $(TAR_OPT_EX) -cf - * | (cd $(DATADIR); tar -xf -) install-bin: $(INSTALL) $(INSTALL_BIN) -d $(BINDIR) $(INSTALL) $(INSTALL_BIN) $(BINSRC) $(BINDIR)/$(BINFILE) --- 63,98 ---- install-etc: + @echo "=== Installing files into $(ETCDIR) ..." $(INSTALL) $(INSTALL_BIN) -d $(ETCDIR) ! @if [ ! -d $(ETCDIR) ]; then exit 1; fi @if [ -f $(ETCDIR)/$(LIBFILE) ]; then \ ! echo "Not installing, file exists: $(ETCDIR)/$(LIBFILE)"; \ else \ + echo "use lib '$(ETCDIR)';" > $(LIBSRC); \ + echo "use lib '$(DATADIR)';" >> $(LIBSRC); \ + echo "1;" >> $(LIBSRC); \ $(INSTALL) $(INSTALL_DATA) $(LIBSRC) $(ETCDIR)/$(LIBFILE); \ fi; @if [ -f $(ETCDIR)/$(CONFFILE) ]; then \ ! echo "Not installing, file exists: $(ETCDIR)/$(CONFFILE)"; \ else \ $(INSTALL) $(INSTALL_DATA) $(CONFSRC) $(ETCDIR)/$(CONFFILE); \ fi; ! @echo "===" ! @echo "=== You may need to edit files in $(ETCDIR)" ! @echo "===" install-store: + @echo "=== Installing pastebot store into $(PASTEDIR) ..." $(INSTALL) $(INSTALL_BIN) -d $(PASTEDIR) install-lib: install-store + @echo "=== Installing pastebot library into $(DATADIR) ..." $(INSTALL) $(INSTALL_BIN) -d $(DATADIR) ! @if [ ! -d $(DATADIR) ]; then exit 1; fi ! @tar $(TAR_OPT_EX) -cf - * | (cd $(DATADIR); tar -xf -) install-bin: + @echo "=== Installing $(BINDIR)/$(BINFILE) ..." $(INSTALL) $(INSTALL_BIN) -d $(BINDIR) $(INSTALL) $(INSTALL_BIN) $(BINSRC) $(BINDIR)/$(BINFILE) *************** *** 91,110 **** distdir: ! -perl -MExtUtils::Command -e rm_rf $(DISTBUILD) ! perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')" ! find $(DISTBUILD) -type f | xargs chmod u+w clean: ! -perl -MExtUtils::Command -e rm_rf $(DISTBUILD) manicheck: ! perl -MExtUtils::Manifest=manicheck -e 'manicheck()' filecheck: ! perl -MExtUtils::Manifest=filecheck -e 'filecheck()' mkmanifest: ! perl -MExtUtils::Manifest=mkmanifest -e 'mkmanifest()' ! ! changes: ! cvs-log.perl > CHANGES --- 101,122 ---- distdir: ! cvs-log.perl > CHANGES ! @perl -MExtUtils::Command -e rm_rf $(DISTBUILD) ! @perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')" ! @find $(DISTBUILD) -type f | xargs chmod u+w clean: ! @perl -MExtUtils::Command -e rm_rf $(DISTBUILD) pastebot.lib.sample patch.* ! @find . -name '*~' -delete ! @find . -name '*.orig' -delete ! @find . -name '*.bak' -delete ! @find . -name '.*.swp' -delete manicheck: ! @perl -MExtUtils::Manifest=manicheck -e 'manicheck()' filecheck: ! @perl -MExtUtils::Manifest=filecheck -e 'filecheck()' mkmanifest: ! @perl -MExtUtils::Manifest=mkmanifest -e 'mkmanifest()' Index: pastebot.perl =================================================================== RCS file: /cvsroot/pastebot/pastebot/pastebot.perl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pastebot.perl 14 May 2004 06:54:25 -0000 1.6 --- pastebot.perl 8 Sep 2004 15:51:20 -0000 1.7 *************** *** 15,19 **** # use Client::IRC ; - # The last file overrides. This file can tell where the libraries # by including statement: --- 15,18 ---- |
|
From: <rc...@us...> - 2004-09-08 15:10:50
|
Update of /cvsroot/pastebot/pastebot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13759 Modified Files: Makefile README Log Message: Removed the bogus "&& \" from the makefile. I'm not sure whether that's just extra text or whether it indicates a missing command, though. More debugging is needed there. I fixed the install paths. Pastebot now installs in /usr/local/... rather than /usr/... It seemed more reasonable that way. The README is slightly updated. Index: Makefile =================================================================== RCS file: /cvsroot/pastebot/pastebot/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile 3 Sep 2004 03:17:42 -0000 1.4 --- Makefile 8 Sep 2004 15:10:40 -0000 1.5 *************** *** 5,14 **** DISTTGZ=$(DISTTAR).gz ! DESTDIR = ! prefix = $(DESTDIR)/usr exec_prefix = $(prefix) man_prefix = $(prefix)/share ! sysconfdir = $(DESTDIR)/etc ! datadir = $(prefix)/share INSTALL = /usr/bin/install --- 5,13 ---- DISTTGZ=$(DISTTAR).gz ! prefix = /usr/local ! datadir = $(prefix)/share exec_prefix = $(prefix) man_prefix = $(prefix)/share ! sysconfdir = $(prefix)/etc INSTALL = /usr/bin/install *************** *** 16,20 **** INSTALL_DATA = -m 644 - PACKAGE = pastebot --- 15,18 ---- *************** *** 34,42 **** ETCDIR = $(sysconfdir)/$(PACKAGE) ! TAR_OPT_EX = --exclude=CVS --exclude=*[~\#] dist: $(DISTTGZ) ! $(DISTTGZ): distdir if [ -e $(DISTTGZ) ] ; \ then echo $(DISTTGZ) already exists ; \ --- 32,40 ---- ETCDIR = $(sysconfdir)/$(PACKAGE) ! TAR_OPT_EX = --exclude=CVS --exclude=*[~\#] --exclude *.conf *.orig patch.* *.bak dist: $(DISTTGZ) ! $(DISTTGZ): distdir changes if [ -e $(DISTTGZ) ] ; \ then echo $(DISTTGZ) already exists ; \ *************** *** 64,68 **** install-etc: ! $(INSTALL) $(INSTALL_DATA) -d $(ETCDIR) if [ ! -d $(ETCDIR) ]; then exit 1; fi @if [ -f $(ETCDIR)/$(LIBFILE) ]; then \ --- 62,66 ---- install-etc: ! $(INSTALL) $(INSTALL_BIN) -d $(ETCDIR) if [ ! -d $(ETCDIR) ]; then exit 1; fi @if [ -f $(ETCDIR)/$(LIBFILE) ]; then \ *************** *** 79,91 **** install-store: ! $(INSTALL) $(INSTALL_DATA) -d $(PASTEDIR) install-lib: install-store ! $(INSTALL) $(INSTALL_DATA) -d $(DATADIR) if [ ! -d $(DATADIR) ]; then exit 1; fi tar $(TAR_OPT_EX) -cf - * | (cd $(DATADIR); tar -xf -) install-bin: ! $(INSTALL) $(INSTALL_DATA) -d $(BINDIR) $(INSTALL) $(INSTALL_BIN) $(BINSRC) $(BINDIR)/$(BINFILE) --- 77,89 ---- install-store: ! $(INSTALL) $(INSTALL_BIN) -d $(PASTEDIR) install-lib: install-store ! $(INSTALL) $(INSTALL_BIN) -d $(DATADIR) if [ ! -d $(DATADIR) ]; then exit 1; fi tar $(TAR_OPT_EX) -cf - * | (cd $(DATADIR); tar -xf -) install-bin: ! $(INSTALL) $(INSTALL_BIN) -d $(BINDIR) $(INSTALL) $(INSTALL_BIN) $(BINSRC) $(BINDIR)/$(BINFILE) *************** *** 108,109 **** --- 106,110 ---- mkmanifest: perl -MExtUtils::Manifest=mkmanifest -e 'mkmanifest()' + + changes: + cvs-log.perl > CHANGES Index: README =================================================================== RCS file: /cvsroot/pastebot/pastebot/README,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** README 13 Feb 2004 23:56:18 -0000 1.11 --- README 8 Sep 2004 15:10:40 -0000 1.12 *************** *** 5,9 **** ----- ! To do. ------------- --- 5,12 ---- ----- ! Pastebot is a web-based dropbox for small texts. On the one hand, it ! is a web server, accepting "pastes" from one person to share with ! others. On the other hand, it is an IRC bot that announces paste URLs ! on appropriate channels. ------------- *************** *** 11,17 **** ------------- ! If you're the system administrator of Linux/Unix/Cygwin like machine, ! to install the package, use following commads. The first one can be ! left out if you already have all the required Perl modules. make install-cpan --- 14,19 ---- ------------- ! If you're the system administrator for your machine, you can install ! all the necessary modules with make install-cpan *************** *** 20,26 **** The default installation structure: ! /etc/pastebot/ Configuration files ! /usr/share/pastebot Libraries ! /usr/bin executables ------------ --- 22,28 ---- The default installation structure: ! /usr/local/etc/pastebot/ Configuration files ! /usr/local/share/pastebot Libraries ! /usr/local/bin Executables ------------ *************** *** 38,48 **** POE POE::Component::IRC Storable (comes with perl 5.8.1) Text::Template ! Time::HiRes URI - Perl::Tidy, which is part of perltidy, at http://perltidy.sf.net/ - ---------- Setting up --- 40,49 ---- POE POE::Component::IRC + Perl::Tidy Storable (comes with perl 5.8.1) Text::Template ! Time::HiRes (comes with perl 5.8.1) URI ---------- Setting up |
|
From: <rc...@us...> - 2004-09-03 03:17:52
|
Update of /cvsroot/pastebot/pastebot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29174 Modified Files: Makefile Log Message: Removed an errant "&& \" from the end of one of the install directives. Thanks to buu for actually using the makefile and discovering the problem. It's kinda sad that he's a whiner, with such amazing initial feedback as "Someone fix pastebot =[". Luckily he responds with details when pressed, or this would probably never have been fixed. So in the end, go, buu! Index: Makefile =================================================================== RCS file: /cvsroot/pastebot/pastebot/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 13 Feb 2004 23:56:18 -0000 1.3 --- Makefile 3 Sep 2004 03:17:42 -0000 1.4 *************** *** 84,88 **** $(INSTALL) $(INSTALL_DATA) -d $(DATADIR) if [ ! -d $(DATADIR) ]; then exit 1; fi ! tar $(TAR_OPT_EX) -cf - * | (cd $(DATADIR); tar -xf -) && \ install-bin: --- 84,88 ---- $(INSTALL) $(INSTALL_DATA) -d $(DATADIR) if [ ! -d $(DATADIR) ]; then exit 1; fi ! tar $(TAR_OPT_EX) -cf - * | (cd $(DATADIR); tar -xf -) install-bin: |
|
From: <rc...@us...> - 2004-06-09 02:31:27
|
Update of /cvsroot/pastebot/pastebot/Client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30379/Client Modified Files: IRC.pm Log Message: Indigoid runs Memephage in a channel with a lot of color codes flying around. He discovered that Memephage was collecting broken URLs because of colorization attached to them, so he wrote a few regular expressions to remove them. This commit adds his color filtering code. Index: IRC.pm =================================================================== RCS file: /cvsroot/pastebot/pastebot/Client/IRC.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** IRC.pm 22 Dec 2003 06:38:41 -0000 1.17 --- IRC.pm 9 Jun 2004 02:31:10 -0000 1.18 *************** *** 148,151 **** --- 148,154 ---- my ($nick) = $sender =~ /^([^!]+)/; print "Message $msg from $nick\n"; + + $msg = remove_colors($msg); + if ($msg =~ /^\s*help(?:\s+(\w+))?\s*$/) { my $what = $1 || 'help'; *************** *** 488,491 **** --- 491,495 ---- # Do something with input here? + # If so, remove colors from it first. }, }, *************** *** 536,539 **** --- 540,556 ---- } + # Helper functions. Remove color codes from a message. + + sub remove_colors { + my $msg = shift; + + # Indigoid supplied these regexps to extract colors. + $msg =~ s/[\x02\x0F\x11\x12\x16\x1d\x1f]//g; # Regular attributes. + $msg =~ s/\x03[0-9,]*//g; # mIRC colors. + $msg =~ s/\x04[0-9a-f]+//ig; # Other colors. + + return $msg; + } + #------------------------------------------------------------------------------ 1; |
|
From: <rc...@us...> - 2004-05-14 17:09:04
|
Update of /cvsroot/pastebot/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12410 Modified Files: loginfo Log Message: Testing syncmail. Sorry for the commit noise. Index: loginfo =================================================================== RCS file: /cvsroot/pastebot/CVSROOT/loginfo,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** loginfo 30 Oct 2003 17:11:27 -0000 1.4 --- loginfo 14 May 2004 17:08:53 -0000 1.5 *************** *** 26,28 **** --- 26,29 ---- #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog # + # DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} "" pas...@li... |
|
From: <rc...@us...> - 2003-12-22 06:46:58
|
Update of /cvsroot/pastebot/pastebot/Server
In directory sc8-pr-cvs1:/tmp/cvs-serv9795/Server
Modified Files:
Web.pm
Log Message:
Make the page footer HTML 4.01 Transitional "OK" again.
Index: Web.pm
===================================================================
RCS file: /cvsroot/pastebot/pastebot/Server/Web.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Web.pm 22 Dec 2003 06:38:42 -0000 1.20
--- Web.pm 22 Dec 2003 06:46:55 -0000 1.21
***************
*** 31,35 ****
"<a href='http://sf.net/projects/pastebot/'>Pastebot</a>" .
" is powered by " .
! "<a href='http://poe.perl.org/'>POE</a>."
)
}
--- 31,35 ----
"<a href='http://sf.net/projects/pastebot/'>Pastebot</a>" .
" is powered by " .
! "<a href='http://poe.perl.org/'>POE</a>.</font></div>"
)
}
|
|
From: <rc...@us...> - 2003-12-22 06:38:45
|
Update of /cvsroot/pastebot/pastebot/Server
In directory sc8-pr-cvs1:/tmp/cvs-serv8737/Server
Modified Files:
Web.pm
Log Message:
Applied Jeremy Mates' patches. They add more robust URL handling,
better X-Forwarded-For support, line counts to the on-channel
announcement, and cleaner channel list building code.
Index: Web.pm
===================================================================
RCS file: /cvsroot/pastebot/pastebot/Server/Web.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** Web.pm 5 Dec 2003 05:41:39 -0000 1.19
--- Web.pm 22 Dec 2003 06:38:42 -0000 1.20
***************
*** 72,83 ****
$heap->{remote_port} = $remote_port;
! $heap->{wheel} = new POE::Wheel::ReadWrite
! ( Handle => $socket,
! Driver => new POE::Driver::SysRW,
! Filter => new POE::Filter::HTTPD,
! InputEvent => 'got_query',
! FlushedEvent => 'got_flush',
! ErrorEvent => 'got_error',
! );
}
--- 72,83 ----
$heap->{remote_port} = $remote_port;
! $heap->{wheel} = new POE::Wheel::ReadWrite(
! Handle => $socket,
! Driver => new POE::Driver::SysRW,
! Filter => new POE::Filter::HTTPD,
! InputEvent => 'got_query',
! FlushedEvent => 'got_flush',
! ErrorEvent => 'got_error',
! );
}
***************
*** 91,97 ****
my ($session, $heap, $operation, $errnum, $errstr) =
@_[SESSION, HEAP, ARG0, ARG1, ARG2];
! warn( "connection session ", $session->ID,
! " got $operation error $errnum: $errstr\n"
! );
delete $heap->{wheel};
}
--- 91,98 ----
my ($session, $heap, $operation, $errnum, $errstr) =
@_[SESSION, HEAP, ARG0, ARG1, ARG2];
! warn(
! "connection session ", $session->ID,
! " got $operation error $errnum: $errstr\n"
! );
delete $heap->{wheel};
}
***************
*** 125,136 ****
my $url = $request->url() . '';
! # strip trailing / to prevent odd page errors
! $url =~ s,//+$,/,;
### Fetch the highlighted style sheet.
if ($url eq '/style') {
! my $response =
! static_response( "templates/highlights.css", { } );
$heap->{wheel}->put( $response );
return;
--- 126,136 ----
my $url = $request->url() . '';
! # strip multiple // to prevent errors
! $url =~ s,//+,/,;
### Fetch the highlighted style sheet.
if ($url eq '/style') {
! my $response = static_response( "templates/highlights.css", { } );
$heap->{wheel}->put( $response );
return;
***************
*** 198,215 ****
my $remote_addr = $heap->{remote_addr};
if ($heap->{my_proxy} && $remote_addr eq $heap->{my_proxy}) {
! # apache sets the X-Forwarded-For header to a list of the
! # IP addresses that were forwarded from/to
! my $forwarded = $request->headers->header('X-Forwarded-For');
! if ($forwarded) {
! ($remote_addr) = split ',', $forwarded;
! }
! # else must be local
! }
!
! if (defined $heap->{my_iname}) {
my $forwarded = $request->headers->header('X-Forwarded-For');
if ($forwarded) {
! ($heap->{remote_addr}) = split ',', $forwarded;
}
}
--- 198,208 ----
my $remote_addr = $heap->{remote_addr};
if ($heap->{my_proxy} && $remote_addr eq $heap->{my_proxy}) {
! # apache sets the X-Forwarded-For header to a list of the
! # IP addresses that were forwarded from/to
my $forwarded = $request->headers->header('X-Forwarded-For');
if ($forwarded) {
! ($remote_addr) = $forwarded =~ /([^,\s]+)$/;
}
+ # else must be local?
}
***************
*** 218,226 ****
# See if it matches.
if (is_ignored($heap->{my_isrv}, $channel, $remote_addr)) {
! $error =
! ( "<p><b><font size='+1' color='#800000'>" .
! "Your IP address has been blocked from pasting to $channel." .
! "</font></b></p>"
! );
$channel = "";
}
--- 211,219 ----
# See if it matches.
if (is_ignored($heap->{my_isrv}, $channel, $remote_addr)) {
! $error = (
! "<p><b><font size='+1' color='#800000'>" .
! "Your IP address has been blocked from pasting to $channel." .
! "</font></b></p>"
! );
$channel = "";
}
***************
*** 230,238 ****
if (length $channel) {
unless (grep $_ eq $channel, channels($heap->{my_isrv})) {
! $error =
! ( "<p><b><font size='+1' color='#800000'>" .
! "I'm not on $channel." .
! "</font></b></p>"
! );
$channel = "";
}
--- 223,231 ----
if (length $channel) {
unless (grep $_ eq $channel, channels($heap->{my_isrv})) {
! $error = (
! "<p><b><font size='+1' color='#800000'>" .
! "I'm not on $channel." .
! "</font></b></p>"
! );
$channel = "";
}
***************
*** 249,253 ****
if (length $nick) {
$nick = qq("$nick");
! } else {
$nick = "Someone";
}
--- 242,247 ----
if (length $nick) {
$nick = qq("$nick");
! }
! else {
$nick = "Someone";
}
***************
*** 280,312 ****
my $html_summary = html_encode($summary);
! my $id = store_paste( $nick, $html_summary, $paste,
! $heap->{my_isrv}, $channel, $remote_addr
! );
my $paste_link;
if (defined $heap->{my_iname}) {
! $paste_link = $heap->{my_iname} .
! (($heap->{my_iname} =~ m,/$,) ? $id : "/$id");
! } else {
$paste_link = "http://$heap->{my_inam}:$heap->{my_port}/$id";
}
$paste = fix_paste($paste, 0, 0, 0, 0);
! my $response =
! static_response( "templates/paste-answer.html",
! { paste_id => $id,
! error => $error,
! paste_link => $paste_link,
! nick => $nick,
! summary => $summary,
! paste => $paste,
! footer => PAGE_FOOTER,
! }
! );
if ($channel and $channel =~ /^\#/) {
! $kernel->post( "irc_client_$heap->{my_isrv}" => announce =>
! $channel => "$nick pasted \"$summary\" at $paste_link"
! );
}
--- 274,324 ----
my $html_summary = html_encode($summary);
! my $id = store_paste(
! $nick, $html_summary, $paste,
! $heap->{my_isrv}, $channel, $remote_addr
! );
my $paste_link;
if (defined $heap->{my_iname}) {
! $paste_link = (
! $heap->{my_iname} .
! (
! ($heap->{my_iname} =~ m,/$,)
! ? $id
! : "/$id"
! )
! );
! }
! else {
$paste_link = "http://$heap->{my_inam}:$heap->{my_port}/$id";
}
+ # show number of lines in paste in channel announce
+ my $paste_lines = 0;
+ $paste_lines++ for $paste =~ m/^.*$/mg;
+
$paste = fix_paste($paste, 0, 0, 0, 0);
! my $response = static_response(
! "templates/paste-answer.html",
! { paste_id => $id,
! error => $error,
! paste_link => $paste_link,
! nick => $nick,
! summary => $summary,
! paste => $paste,
! footer => PAGE_FOOTER,
! }
! );
if ($channel and $channel =~ /^\#/) {
! $kernel->post(
! "irc_client_$heap->{my_isrv}" => announce =>
! $channel,
! "$nick pasted \"$summary\" ($paste_lines line" .
! ($paste_lines == 1 ? '' : 's') . ") at $paste_link"
! );
! }
! else {
! warn "channel $channel was strange";
}
***************
*** 361,379 ****
}
else {
! $response = static_response
! ( "templates/paste-lookup.html",
! { bot_name => $heap->{my_name},
! paste_id => $num,
! nick => $nick,
! summary => $summary,
! paste => $paste,
! footer => PAGE_FOOTER,
! tidy => ( $tidy ? "checked" : "" ),
! hl => ( $hl ? "checked" : "" ),
! ln => ( $ln ? "checked" : "" ),
! tx => ( $tx ? "checked" : "" ),
! wr => ( $wr ? "checked" : "" ),
! }
! );
if ($store) {
$response->push_header('Set-Cookie'=>cookie(tidy=>$tidy, $request));
--- 373,391 ----
}
else {
! $response = static_response(
! "templates/paste-lookup.html",
! { bot_name => $heap->{my_name},
! paste_id => $num,
! nick => $nick,
! summary => $summary,
! paste => $paste,
! footer => PAGE_FOOTER,
! tidy => ( $tidy ? "checked" : "" ),
! hl => ( $hl ? "checked" : "" ),
! ln => ( $ln ? "checked" : "" ),
! tx => ( $tx ? "checked" : "" ),
! wr => ( $wr ? "checked" : "" ),
! }
! );
if ($store) {
$response->push_header('Set-Cookie'=>cookie(tidy=>$tidy, $request));
***************
*** 402,441 ****
### Root page.
! if ($url =~ m,^/(\w+)?,) {
!
! # Dynamically build the channel options from the configuration
! # file's list.
!
! my @tmpchans = channels($heap->{my_isrv});
! my @channels;
# set default channel from request URL, if possible
my $prefchan = $1;
! if ($prefchan) {
! $prefchan =~ s/^/#/;
! push @channels, grep { $_ eq $prefchan } @tmpchans;
! push @channels, grep { $_ ne $prefchan } @tmpchans;
}
else {
! @channels = @tmpchans;
}
! if (@channels) {
! @channels = sort @channels;
! @channels = map { "<option value='$_'>$_" }
! map html_encode($_), @channels;
! $channels[0] =~ s/\'\>/\' selected="selected">/ if @channels == 1;
! }
! unshift(@channels, "<option value=''>(none)");
# Build content.
! my $response =
! static_response( "templates/paste-form.html",
! { bot_name => $heap->{my_name},
! channels => "@channels",
! footer => PAGE_FOOTER,
! }
! );
$heap->{wheel}->put($response);
return;
--- 414,452 ----
### Root page.
! # 2003-12-22 - RC - Added _ and - as legal characters for channel
! # names. What else?
! if ($url =~ m,^/([\_\-\w]+)?,) {
# set default channel from request URL, if possible
my $prefchan = $1;
! if (defined $prefchan) {
! $prefchan =~ s/^#*/#/;
}
else {
! $prefchan = '';
}
! # Dynamically build the channel options from the configuration
! # file's list.
! my @channels = channels($heap->{my_isrv});
! unshift @channels, '';
!
! @channels = map {
! qq(<option value="$_")
! . ($_ eq $prefchan ? ' selected' : '')
! . '>'
! . ($_ eq '' ? '(none)' : $_)
! . '</option>'
! } sort @channels;
# Build content.
! my $response = static_response(
! "templates/paste-form.html",
! { bot_name => $heap->{my_name},
! channels => "@channels",
! footer => PAGE_FOOTER,
! }
! );
$heap->{wheel}->put($response);
return;
***************
*** 452,513 ****
local $^W = 0;
! $response->content
! ( "<html><head><title>Strange Request Dump</title></head>" .
! "<body>" .
! "<p>" .
! "Your request was strange. " .
! "Here is everything I could figure out about it:" .
! "</p>" .
! "<table border=1>" .
! {% table_method authorization %} .
! {% table_method authorization_basic %} .
! {% table_method content_encoding %} .
! {% table_method content_language %} .
! {% table_method content_length %} .
! {% table_method content_type %} .
! {% table_method content %} .
! {% table_method date %} .
! {% table_method expires %} .
! {% table_method from %} .
! {% table_method if_modified_since %} .
! {% table_method if_unmodified_since %} .
! {% table_method last_modified %} .
! {% table_method method %} .
! {% table_method protocol %} .
! {% table_method proxy_authorization %} .
! {% table_method proxy_authorization_basic %} .
! {% table_method referer %} .
! {% table_method server %} .
! {% table_method title %} .
! {% table_method url %} .
! {% table_method user_agent %} .
! {% table_method www_authenticate %} .
! {% table_header Accept %} .
! {% table_header Connection %} .
! {% table_header Host %} .
! {% table_header username %} .
! {% table_header opaque %} .
! {% table_header stale %} .
! {% table_header algorithm %} .
! {% table_header realm %} .
! {% table_header uri %} .
! {% table_header qop %} .
! {% table_header auth %} .
! {% table_header nonce %} .
! {% table_header cnonce %} .
! {% table_header nc %} .
! {% table_header response %} .
! "</table>" .
! &dump_content($request->content()) .
! "<p>Request as string=" . $request->as_string() . "</p>" .
! "</body></html>"
! );
# A little debugging here.
--- 463,524 ----
local $^W = 0;
! $response->content(
! "<html><head><title>Strange Request Dump</title></head>" .
! "<body>" .
! "<p>" .
! "Your request was strange. " .
! "Here is everything I could figure out about it:" .
! "</p>" .
! "<table border=1>" .
! {% table_method authorization %} .
! {% table_method authorization_basic %} .
! {% table_method content_encoding %} .
! {% table_method content_language %} .
! {% table_method content_length %} .
! {% table_method content_type %} .
! {% table_method content %} .
! {% table_method date %} .
! {% table_method expires %} .
! {% table_method from %} .
! {% table_method if_modified_since %} .
! {% table_method if_unmodified_since %} .
! {% table_method last_modified %} .
! {% table_method method %} .
! {% table_method protocol %} .
! {% table_method proxy_authorization %} .
! {% table_method proxy_authorization_basic %} .
! {% table_method referer %} .
! {% table_method server %} .
! {% table_method title %} .
! {% table_method url %} .
! {% table_method user_agent %} .
! {% table_method www_authenticate %} .
! {% table_header Accept %} .
! {% table_header Connection %} .
! {% table_header Host %} .
! {% table_header username %} .
! {% table_header opaque %} .
! {% table_header stale %} .
! {% table_header algorithm %} .
! {% table_header realm %} .
! {% table_header uri %} .
! {% table_header qop %} .
! {% table_header auth %} .
! {% table_header nonce %} .
! {% table_header cnonce %} .
! {% table_header nc %} .
! {% table_header response %} .
! "</table>" .
! &dump_content($request->content()) .
! "<p>Request as string=" . $request->as_string() . "</p>" .
! "</body></html>"
! );
# A little debugging here.
***************
*** 529,562 ****
my %ircconf = get_items_by_name($conf{irc});
! POE::Component::Server::TCP->new
! ( Port => $conf{port},
! ( (defined $conf{iface})
! ? ( Address => $conf{iface} )
! : ()
! ),
! Acceptor =>
! sub {
! POE::Session->new
! ( _start => \&httpd_session_started,
! got_flush => \&httpd_session_flushed,
! got_query => \&httpd_session_got_query,
! got_error => \&httpd_session_got_error,
! # Note the use of ifname here in ARG6. This gives the
! # responding session knowledge of its host name for
! # building HTML responses. Most of the time it will be
! # identical to iface, but sometimes there may be a reverse
! # proxy, firewall, or NATD between the address we bind to
! # and the one people connect to. In that case, ifname is
! # the address the outside world sees, and iface is the one
! # we've bound to.
! [ @_[ARG0..ARG2], $server,
! $conf{iface}, $conf{port}, $conf{ifname}, $conf{irc},
! $conf{proxy}, $conf{iname},
! ],
! );
! },
! );
}
--- 540,573 ----
my %ircconf = get_items_by_name($conf{irc});
! POE::Component::Server::TCP->new(
! Port => $conf{port},
! ( (defined $conf{iface})
! ? ( Address => $conf{iface} )
! : ()
! ),
! Acceptor =>
! sub {
! POE::Session->new
! ( _start => \&httpd_session_started,
! got_flush => \&httpd_session_flushed,
! got_query => \&httpd_session_got_query,
! got_error => \&httpd_session_got_error,
! # Note the use of ifname here in ARG6. This gives the
! # responding session knowledge of its host name for
! # building HTML responses. Most of the time it will be
! # identical to iface, but sometimes there may be a reverse
! # proxy, firewall, or NATD between the address we bind to
! # and the one people connect to. In that case, ifname is
! # the address the outside world sees, and iface is the one
! # we've bound to.
! [ @_[ARG0..ARG2], $server,
! $conf{iface}, $conf{port}, $conf{ifname}, $conf{irc},
! $conf{proxy}, $conf{iname},
! ],
! );
! },
! );
}
***************
*** 571,579 ****
my $tidy_version = "";
eval {
! Perl::Tidy::perltidy
! ( source => \$paste,
! destination => \$tidy_version,
! argv => [ '-q', '-nanl', '-fnl' ],
! );
};
if ($@) {
--- 582,590 ----
my $tidy_version = "";
eval {
! Perl::Tidy::perltidy(
! source => \$paste,
! destination => \$tidy_version,
! argv => [ '-q', '-nanl', '-fnl' ],
! );
};
if ($@) {
***************
*** 593,605 ****
my $highlighted = "";
eval {
! Perl::Tidy::perltidy
! ( source => \$paste,
! destination => \$highlighted,
! argv => \@html_args,
! );
};
if ($@) {
! $highlighted =
! "Could not highlight the paste (try turning highlighting off): $@";
}
return $highlighted;
--- 604,617 ----
my $highlighted = "";
eval {
! Perl::Tidy::perltidy(
! source => \$paste,
! destination => \$highlighted,
! argv => \@html_args,
! );
};
if ($@) {
! $highlighted = (
! "Could not highlight the paste (try turning highlighting off): $@"
! );
}
return $highlighted;
|
|
From: <rc...@us...> - 2003-12-22 06:38:44
|
Update of /cvsroot/pastebot/pastebot/Client
In directory sc8-pr-cvs1:/tmp/cvs-serv8737/Client
Modified Files:
IRC.pm
Log Message:
Applied Jeremy Mates' patches. They add more robust URL handling,
better X-Forwarded-For support, line counts to the on-channel
announcement, and cleaner channel list building code.
Index: IRC.pm
===================================================================
RCS file: /cvsroot/pastebot/pastebot/Client/IRC.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** IRC.pm 30 Nov 2003 17:27:17 -0000 1.16
--- IRC.pm 22 Dec 2003 06:38:41 -0000 1.17
***************
*** 338,342 ****
announce => sub {
! my ($kernel, $heap, $channel, $message) = @_[KERNEL, HEAP, ARG0, ARG1];
$kernel->post( $server => privmsg => $channel => $message );
},
--- 338,343 ----
announce => sub {
! my ($kernel, $heap, $channel, $message) =
! @_[KERNEL, HEAP, ARG0, ARG1];
$kernel->post( $server => privmsg => $channel => $message );
},
|
|
From: <rc...@us...> - 2003-12-22 05:29:18
|
Update of /cvsroot/pastebot/pastebot
In directory sc8-pr-cvs1:/tmp/cvs-serv31728
Modified Files:
README
Log Message:
Apply Jeremy Mates' documentation patches. He expanded upon the
Apache proxypass documentation and documented another error message.
This should get more pastebots on port 80 where they belong. :)
Index: README
===================================================================
RCS file: /cvsroot/pastebot/pastebot/README,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** README 31 Oct 2003 16:35:12 -0000 1.9
--- README 22 Dec 2003 05:29:14 -0000 1.10
***************
*** 42,51 ****
Apache users can use ProxyPass to map a directory on their port-80
! servers to a running pastebot. This feature requires Apache be built
! with proxy support.
Create a virtual location for the proxy directory.
! <Location /pastebot/>
Order allow,deny
Allow from all
--- 42,58 ----
Apache users can use ProxyPass to map a directory on their port-80
! servers to a running pastebot. This feature requires Apache be built
! with both mod_proxy and mod_proxy_add_forward.c support, and that the
! add forward module come before the proxy module:
!
! ./configure --enable-module=proxy \
! --activate-module=src/modules/extra/mod_proxy_add_forward.c \
! --enable-module=proxy_add_forward \
! --permute-module=proxy:END \
! ...
Create a virtual location for the proxy directory.
! <Location /pastebot>
Order allow,deny
Allow from all
***************
*** 58,67 ****
ProxyPass /pastebot/ http://127.0.0.1:8000/
! Now people can use pastebot on port 80. Be sure to set the 'iname'
configuration flag in the pastebot.conf web_server configuration section
! to hide the internal host/port values.
! Be sure to set the "iname" option to point to your Apache server
! rather than the pastebot server directly.
------
--- 65,77 ----
ProxyPass /pastebot/ http://127.0.0.1:8000/
! Now people can use pastebot on port 80. Be sure to set the 'iname'
configuration flag in the pastebot.conf web_server configuration section
! to hide the internal host/port values. Also be sure to set the proxy
! parameter:
! web_server
! ...
! proxy 127.0.0.1
! iname http://example.org/pastebot/
------
***************
*** 81,84 ****
--- 91,119 ----
without installing a module it in turn needs. You'll need to install
[some module] manually.
+
+ * <something> section <name> is redefined at ##
+
+ This error looks something like:
+
+ pastes section pbtest is redefined at 68
+ Compilation failed in require at Server/Web.pm line 18, <MPH> line 85.
+ BEGIN failed--compilation aborted at Server/Web.pm line 18, <MPH> line 85.
+ Compilation failed in require at ./pastebot.perl line 9, <MPH> line 85.
+ BEGIN failed--compilation aborted at ./pastebot.perl line 9, <MPH> line 85.
+
+ To fix, update the pastebot.conf to use different names for the
+ different sections:
+
+ web_server
+ name poenet
+ ...
+
+ irc
+ name efnet
+ ...
+
+ pastes
+ name neitherpoenetnorefnet
+ ...
-------
|
|
From: <rc...@us...> - 2003-12-05 17:29:51
|
Update of /cvsroot/pastebot/pastebot/templates
In directory sc8-pr-cvs1:/tmp/cvs-serv19882
Modified Files:
paste-answer.html paste-form.html paste-lookup.html
Log Message:
Matthijs van Duin (efnet, CPAN "xmath") insisted that the HTML
responses aren't compliant with w3c's HTML 4.01 specification without
including a character encoding. He STRONGLY insisted that some form
of encoding be specified.
| <xmath> [character encoding is] not "advisory".. without it [the
| HTML] is not valid
He provided the patch that I am applying with this commit. By
applying this patch, I have disregarded the objections of Juerd and
Yaakov:
| <Yaakov> The ecoding type is NOT part of the HTML in that document,
| it is a server issue.
| <xmath> that's why you should specify it in the header
| <xmath> Yaakov: if you just specify it on both the form page and the
| result page, then at least people can enter extended chars
| without worrying about them getting messed up
|
| <xmath> Juerd: I'm not sure all browsers can properly deal with
| utf-8
| <xmath> though I guess modern ones do
| <Juerd> xmath: Most modern browsers
| <Juerd> xmath: But most ANY browsers guess charsets, and they're
| rather good at that
| <xmath> Juerd: yes, because there are so many broken pages
| <Yaakov> Yes... I think that was my point. I don't know what will
| be pasted.
|
| <xmath> if you want to rely on guessing
| <xmath> fine
| <xmath> but then don't put up a "Valid HTML 4.01" logo
| <xmath> because it isn't
| <xmath> anyway, dinner time
| <xmath> bbl
|
| <Juerd> xmath: HTML 4.01 has nothing to do with the charset
| <Yaakov> THAT IS MY POINT
| <Yaakov> The HTML _IS_ VALID
I will be happy to reverse this patch if it breaks more than it fixes.
Index: paste-answer.html
===================================================================
RCS file: /cvsroot/pastebot/pastebot/templates/paste-answer.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** paste-answer.html 4 Jun 2003 03:23:24 -0000 1.2
--- paste-answer.html 5 Dec 2003 17:29:44 -0000 1.3
***************
*** 3,6 ****
--- 3,7 ----
<head>
<title>Your paste, number [% $paste_id %]...</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Index: paste-form.html
===================================================================
RCS file: /cvsroot/pastebot/pastebot/templates/paste-form.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** paste-form.html 30 Oct 2003 17:38:55 -0000 1.7
--- paste-form.html 5 Dec 2003 17:29:45 -0000 1.8
***************
*** 3,6 ****
--- 3,7 ----
<head>
<title>pasting to [% $bot_name %]</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Index: paste-lookup.html
===================================================================
RCS file: /cvsroot/pastebot/pastebot/templates/paste-lookup.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** paste-lookup.html 2 Nov 2003 20:16:38 -0000 1.8
--- paste-lookup.html 5 Dec 2003 17:29:45 -0000 1.9
***************
*** 4,7 ****
--- 4,8 ----
<title>[% $bot_name %] paste from [% $nick %]...</title>
<link rel="stylesheet" type="text/css" href="style">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF">
|
|
From: <to...@us...> - 2003-12-05 05:41:42
|
Update of /cvsroot/pastebot/pastebot/Server
In directory sc8-pr-cvs1:/tmp/cvs-serv8288/Server
Modified Files:
Web.pm
Log Message:
HTML escape the channel names in the drop-down list.
Select the only channel as the default (instead of '(None)') if there
is only one channel.
Index: Web.pm
===================================================================
RCS file: /cvsroot/pastebot/pastebot/Server/Web.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** Web.pm 13 Nov 2003 23:59:34 -0000 1.18
--- Web.pm 5 Dec 2003 05:41:39 -0000 1.19
***************
*** 422,427 ****
if (@channels) {
- @channels = map { "<option value='$_'>$_" } @channels;
@channels = sort @channels;
}
unshift(@channels, "<option value=''>(none)");
--- 422,429 ----
if (@channels) {
@channels = sort @channels;
+ @channels = map { "<option value='$_'>$_" }
+ map html_encode($_), @channels;
+ $channels[0] =~ s/\'\>/\' selected="selected">/ if @channels == 1;
}
unshift(@channels, "<option value=''>(none)");
|
|
From: <ave...@us...> - 2003-11-30 17:27:20
|
Update of /cvsroot/pastebot/pastebot/Util
In directory sc8-pr-cvs1:/tmp/cvs-serv21084/Util
Modified Files:
Conf.pm
Log Message:
Rename stupidly named flag.
Index: Conf.pm
===================================================================
RCS file: /cvsroot/pastebot/pastebot/Util/Conf.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Conf.pm 30 Nov 2003 16:05:14 -0000 1.7
--- Conf.pm 30 Nov 2003 17:27:17 -0000 1.8
***************
*** 31,48 ****
},
irc =>
! { name => SCALAR | REQUIRED,
! server => LIST | REQUIRED,
! nick => LIST | REQUIRED,
! uname => SCALAR | REQUIRED,
! iname => SCALAR | REQUIRED,
! away => SCALAR | REQUIRED,
! flags => SCALAR,
! inviteany => SCALAR,
! channel => LIST | REQUIRED,
! quit => SCALAR | REQUIRED,
! cuinfo => SCALAR | REQUIRED,
! cver => SCALAR | REQUIRED,
! ccinfo => SCALAR | REQUIRED,
! localaddr => SCALAR,
},
pastes =>
--- 31,48 ----
},
irc =>
! { name => SCALAR | REQUIRED,
! server => LIST | REQUIRED,
! nick => LIST | REQUIRED,
! uname => SCALAR | REQUIRED,
! iname => SCALAR | REQUIRED,
! away => SCALAR | REQUIRED,
! flags => SCALAR,
! join_cfg_only => SCALAR,
! channel => LIST | REQUIRED,
! quit => SCALAR | REQUIRED,
! cuinfo => SCALAR | REQUIRED,
! cver => SCALAR | REQUIRED,
! ccinfo => SCALAR | REQUIRED,
! localaddr => SCALAR,
},
pastes =>
|
|
From: <ave...@us...> - 2003-11-30 17:27:20
|
Update of /cvsroot/pastebot/pastebot/Client
In directory sc8-pr-cvs1:/tmp/cvs-serv21084/Client
Modified Files:
IRC.pm
Log Message:
Rename stupidly named flag.
Index: IRC.pm
===================================================================
RCS file: /cvsroot/pastebot/pastebot/Client/IRC.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** IRC.pm 30 Nov 2003 16:05:14 -0000 1.15
--- IRC.pm 30 Nov 2003 17:27:17 -0000 1.16
***************
*** 370,374 ****
my ($kernel, $who, $where) = @_[KERNEL, ARG0, ARG1];
$where =~ s/^#//;
! if ( $conf{inviteany} &&
1 > grep $_ eq $where, @{$conf{channel}} ) {
print "$who invited me to $where, but i'm not allowed\n";
--- 370,374 ----
my ($kernel, $who, $where) = @_[KERNEL, ARG0, ARG1];
$where =~ s/^#//;
! if ( $conf{join_cfg_only} &&
1 > grep $_ eq $where, @{$conf{channel}} ) {
print "$who invited me to $where, but i'm not allowed\n";
|
|
From: <ave...@us...> - 2003-11-30 17:27:20
|
Update of /cvsroot/pastebot/pastebot
In directory sc8-pr-cvs1:/tmp/cvs-serv21084
Modified Files:
pastebot.conf-dist
Log Message:
Rename stupidly named flag.
Index: pastebot.conf-dist
===================================================================
RCS file: /cvsroot/pastebot/pastebot/pastebot.conf-dist,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** pastebot.conf-dist 30 Nov 2003 16:05:14 -0000 1.9
--- pastebot.conf-dist 30 Nov 2003 17:27:17 -0000 1.10
***************
*** 130,134 ****
# not listed above when invited.
! #inviteany 1
# The address the IRC bot binds to. This lets the bot listen
--- 130,134 ----
# not listed above when invited.
! #join_cfg_only 1
# The address the IRC bot binds to. This lets the bot listen
|
|
From: <ave...@us...> - 2003-11-30 16:05:17
|
Update of /cvsroot/pastebot/pastebot/Util
In directory sc8-pr-cvs1:/tmp/cvs-serv6760/Util
Modified Files:
Conf.pm
Log Message:
Add a new flag, to forbid invites to unknown channels.
Index: Conf.pm
===================================================================
RCS file: /cvsroot/pastebot/pastebot/Util/Conf.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Conf.pm 31 Oct 2003 22:41:56 -0000 1.6
--- Conf.pm 30 Nov 2003 16:05:14 -0000 1.7
***************
*** 38,41 ****
--- 38,42 ----
away => SCALAR | REQUIRED,
flags => SCALAR,
+ inviteany => SCALAR,
channel => LIST | REQUIRED,
quit => SCALAR | REQUIRED,
|
|
From: <ave...@us...> - 2003-11-30 16:05:17
|
Update of /cvsroot/pastebot/pastebot
In directory sc8-pr-cvs1:/tmp/cvs-serv6760
Modified Files:
pastebot.conf-dist
Log Message:
Add a new flag, to forbid invites to unknown channels.
Index: pastebot.conf-dist
===================================================================
RCS file: /cvsroot/pastebot/pastebot/pastebot.conf-dist,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** pastebot.conf-dist 31 Oct 2003 22:41:56 -0000 1.8
--- pastebot.conf-dist 30 Nov 2003 16:05:14 -0000 1.9
***************
*** 127,130 ****
--- 127,135 ----
channel perl
+ # If this flag is a true value, the bot will not join channels
+ # not listed above when invited.
+
+ #inviteany 1
+
# The address the IRC bot binds to. This lets the bot listen
# on one vhost out of many that might be available to a
|