You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(21) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Masque <qi...@us...> - 2005-08-08 01:44:26
|
Update of /cvsroot/infobot/infobot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1371 Modified Files: TODO Log Message: Checkin from Alias, until he can get infobot access I'm doing his commits, since lenzo seems to have given away the project. :) Index: TODO =================================================================== RCS file: /cvsroot/infobot/infobot/TODO,v retrieving revision 1.15 retrieving revision 1.16 diff -w -u -r1.15 -r1.16 --- TODO 8 Aug 2005 01:42:35 -0000 1.15 +++ TODO 8 Aug 2005 01:44:07 -0000 1.16 @@ -15,8 +15,8 @@ Infobot TODO list ----------------- -Tim Riker <Ti...@Ri...> woke up the project. Things he'd like -to see added to update infobot: +Tim Riker <Ti...@Ri...> woke up the project [ed: refer to above]. +Things he'd like to see added to update infobot: - move from dbm to SQL backend. Include sqlite for local files |
From: Masque <qi...@us...> - 2005-08-08 01:42:43
|
Update of /cvsroot/infobot/infobot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1204 Modified Files: TODO Log Message: Updated with current thoughts. Index: TODO =================================================================== RCS file: /cvsroot/infobot/infobot/TODO,v retrieving revision 1.14 retrieving revision 1.15 diff -w -u -r1.14 -r1.15 --- TODO 2 Aug 2004 21:18:59 -0000 1.14 +++ TODO 8 Aug 2005 01:42:35 -0000 1.15 @@ -1,3 +1,17 @@ +Update, 1 year and 1 week after the below was written: + +Not much has been done. In fact, nothing for eleven months. +This is what happens with infobot, so this year's superstar +is Alias, who has determined it's a good idea to dist-ify +the data, and we're merging what's been running as purl on +MAGnet for a couple of years now back in as infobot. It's +using flooterbuck's module code now, which is shiny and nice. + +So, current to-do is simply to keep plodding along. Hopefully +momentum will keep progress going. + +Either way, see you back here in a year. + Infobot TODO list ----------------- |
From: Masque <qi...@us...> - 2005-08-08 00:27:28
|
Update of /cvsroot/infobot/infobot/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23371/modules Removed Files: topten.patch Log Message: Oops. This wasn't supposed to be in there. --- topten.patch DELETED --- |
From: Masque <qi...@us...> - 2005-08-08 00:25:05
|
Update of /cvsroot/infobot/infobot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23035 Modified Files: infobot Log Message: Bringing CVS in line with that which is running as purl. Previous version tagged as 'oscon2005' for no particular reason other than date. Index: infobot =================================================================== RCS file: /cvsroot/infobot/infobot/infobot,v retrieving revision 1.15 retrieving revision 1.16 diff -w -u -r1.15 -r1.16 --- infobot 2 Aug 2004 20:37:20 -0000 1.15 +++ infobot 8 Aug 2005 00:24:23 -0000 1.16 @@ -1,16 +1,19 @@ #!/usr/bin/perl # infobot -- copyright kevin lenzo (c) 1997-infinity +# Flooterbuck Infobot -- copyright (C) Dave Brown, 2001-2004 -# no warrantee expressed or implied. terms as the -# license for X11R6 when needed. +# For full licensing terms see the file LICENSE included with +# the flooterbuck distribution. + +require 5.6.0; BEGIN { - $VER_MAJ = 0; - $VER_MIN = 45; - $VER_MOD = 3; + $VER_MAJ = 1; + $VER_MIN = 2; + $VER_MOD = 1; - $version = "infobot $VER_MAJ\.$VER_MIN\.$VER_MOD [Wurm]"; + $version = "Flooterbuck infobot $VER_MAJ\.$VER_MIN\.$VER_MOD [dagbrown]"; } BEGIN { @@ -18,16 +21,13 @@ # set this to the absolute path if you need it; especially # if . is not in your path - # - # XXX I don't have . in my path and I haven't had problems, what - # does this comment mean? -Roderick $param{'basedir'} = ($0 =~ /(.*)$filesep/) ? $1 : '.'; # $infobot_base_dir = '/usr/local/lib/infobot'; # change this next line if you run a local instance of # an infobot and use the code from the main location. - # the 'conf' directory contains infobot.config and + # the 'files' directory contains infobot.config and # infobot.users, among other things. $param{'confdir'} = "$param{basedir}${filesep}conf"; @@ -37,41 +37,15 @@ # is why all these requires are here. $param{'srcdir'} = $param{'basedir'}.$filesep."src"; -} -# Add the source dir to @INC before loading the *.pl files so that they -# can use the modules there. -use lib $param{'srcdir'}; - -BEGIN { opendir DIR, $param{'srcdir'} or die "can't open source directory $param{srcdir}: $!"; - # Sort the files to ensure they get loaded in the same order for - # everybody. The inspiration is that the code worked for me but - # failed for a user because for me DBM.pl was loaded before - # Process.pl. This simple sort fixes that particular problem - # and will at least prevent problems from happening only to some - # people. The sort is case-insensitive so that the results will - # be the same on case-forgiving filesystems. For better control - # one could use artifically low-sorting file names, or invent - # something more elaborate. - for my $file (sort { lc $a cmp lc $b } readdir DIR) { + while ($file = readdir DIR) { next unless $file =~ /\.pl$/; require "$param{srcdir}$filesep$file"; } closedir DIR; - - $param{'extradir'} = $param{'basedir'}.$filesep."extras"; - - opendir DIR, $param{'extradir'} - or die "can't open extras directory $param{extradir}: $!"; - - for my $file (sort { lc $a cmp lc $b } readdir DIR) { - next unless $file =~ /\.pl$/; - require "$param{extradir}$filesep$file"; - } - closedir DIR; } # get the command line arguments @@ -80,29 +54,6 @@ # initialize everything &setup(); -# daemonise if needed -if ($daemon) { - - require Cwd; - - $pid_file = &Cwd::cwd . "/$param{'ident'}.pid"; - - if (-e $pid_file) { - die "$pid_file lockfile exists. Please remove to run infobot as a daemon"; - } - - print "\nChanging to a background process:\n"; - print "PID saved in $pid_file\n"; - - &Proc::Daemon::Init; - - open(PIDFILE, ">$pid_file")||print "Couldn't open $pid_file for writing\n"; - print PIDFILE "$$\n"; - close PIDFILE; - -} - - # launch the irc event loop &irc(); @@ -113,39 +64,41 @@ sub usage { print "\n"; - print " usage: $0 [-h] [<paramfile1> [<pf2> ...]]\n"; + print " usage: $0 [-h] [<config file>]\n"; print "\n"; print " -h this message\n"; print "\n"; } sub getArgs { - if (@ARGV) { - while (@ARGV) { - my $arg = shift @ARGV; - if ($arg =~ s/^-//) { - # switchies - if ($arg eq 'i') { - # go into irc mode despite db setting - $overrideMode = 'IRC'; - } elsif ($arg eq 'd') { - eval "require Proc::Daemon"; - if ($@) { die "Proc::Daemon must be installed to run this as a background process"; } - $daemon++; - } else { - # -h is in here by default + if ($ARGV[0]) { + if ($ARGV[0] =~ /^-[hi\?]/) { &usage; - exit(1); + exit 1; } - } else { - # no switchie. currently assumed to be - # a paramfile by default - push @paramfiles, $arg; + else { + $paramfile = $ARGV[0] } } - } else { - @paramfiles = (); + else { + $paramfile = ''; } } 1; + +__END__ + +=head1 NAME + +Flooterbuck Infobot - a modular IRC information bot + +=head1 SYNOPSIS + +B<infobot> S<[ -h ]> [I<paramfile1> [I<paramfile2> ...]] + +=head1 NOTE + +If you're reading this, you need to yell at +Dave Brown (flo...@da...) +and tell him to write some actual documentation. =) |
From: Masque <qi...@us...> - 2005-08-08 00:24:42
|
Update of /cvsroot/infobot/infobot/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23035/src Modified Files: CTCP.pl Channel.pl DBM.pl Help.pl Irc.pl IrcExtras.pl Misc.pl Norm.pl Params.pl Process.pl Question.pl Reply.pl Search.pl Setup.pl Statement.pl Update.pl User.pl Added Files: ANSI.pl Extras.pl HandleURLs.pl RDF.pl Log Message: Bringing CVS in line with that which is running as purl. Previous version tagged as 'oscon2005' for no particular reason other than date. --- NEW FILE: HandleURLs.pl --- #!/usr/bin/perl -w #------------------------------------------------------------------------ # handle URLs #------------------------------------------------------------------------ use strict; { my %urls; # Mea culpa, this code was pasted from seen.pm sub get_timediff($) { my $when = shift; my $howlong = time() - $when; $when = localtime $when; my @tstring = (($howlong % 60). " second".(($howlong%60>1)&&"s")); my $shorttstring = sprintf("%02d", ($howlong % 60)); $howlong = int($howlong / 60); $shorttstring = sprintf("%02d", ($howlong % 60)). ":$shorttstring"; if ($howlong % 60 > 0) { unshift @tstring, ($howlong % 60). " minute".(($howlong%60>1)&&"s"); } $howlong = int($howlong / 60); $shorttstring = ($howlong % 24). ":$shorttstring"; if ($howlong % 24 > 0) { unshift @tstring, ($howlong % 24). " hour".(($howlong%24>1)&&"s"); } $howlong = int($howlong / 24); if ($howlong % 365 > 0) { $shorttstring = ($howlong % 365). "d, $shorttstring"; unshift @tstring, ($howlong % 365). " day".(($howlong%365>1)&&"s"); } $howlong = int($howlong / 365); if ($howlong > 0) { unshift @tstring, "$howlong years"; $shorttstring = $howlong."y, $shorttstring"; } my $tstring; if(scalar(@tstring)==1) { $tstring=$tstring[0]; } else { $tstring="$tstring[0] and $tstring[1]" } return ($tstring, $shorttstring); } sub ::mentionURL { my ($channel,$url,$who)=@_; $urls{$channel}=$url; ::seenURL($channel,$url,$who); } sub ::lastURL { my $channel=shift; return $urls{$channel}; } sub ::seenURL { my ($channel,$url,$who)=@_; # are you COOL enough?! if($::param{"seenurls"}) { my ($firsttime,$firstnick); my ($lasttime,$lastnick); $lasttime=$firsttime=time; $lastnick=$firstnick=$who; my $oldurl = ::get(seenurls => "$channel|$url"); if($oldurl) { my @instances=split(/\;/,$oldurl); ($firsttime,$firstnick)=split(/,/,$instances[0]); ($lasttime,$lastnick)=split(/,/,$instances[-1]); if( ( ( $::param{"seenurls_obnoxious"} + 0.0 > 0 && rand() < $::param{"seenurls_obnoxious"} ) || $::param{"seenurls_obnoxious"} eq "true" ) && !$::addressed ) { # lambaste 'em for being so uncool as to paste a URL # that anyone had ever seen before ever if($firsttime == $lasttime) { ::say("$who: ". ($lastnick eq $who? "You" : $lastnick). " mentioned that URL here only ". (get_timediff($lasttime))[0]. " ago!"); } else { ::say("$who: You out-of-it clod. " . (($firstnick eq $who)?"You":$firstnick) . " first mentioned that URL here " . (get_timediff($firsttime))[0] . " ago, and " . (($lastnick eq $who) ? "you" : $lastnick). " last mentioned it " . (get_timediff($lasttime))[0] . " ago" . (($lastnick eq $firstnick) ? ", again!": ".")) } } } $lasttime=time; $lastnick=$who; ::set("seenurls","$channel|$url", "$firsttime,$firstnick;$lasttime,$lastnick"); } } # ::seenURL } 1; Index: CTCP.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/CTCP.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 --- CTCP.pl 11 Jan 2002 16:44:37 -0000 1.2 +++ CTCP.pl 8 Aug 2005 00:24:25 -0000 1.3 @@ -1,39 +1,24 @@ # infobot (c) 1997 Lenzo -# CTCP handling methods - -# This subroutine has a misleading name. It should probably -# be called: handleCTCP - sub parsectcp { - -# Read in arguments my ($nick, $user, $host, $type, $dest) = @_; &status("CTCP $type $dest request from $nick"); - -# Handle VERSION requests if ($type =~ /^version/i) { ctcpreply($nick, "VERSION", $version); - -# Handle PING/ECHO request from other clients } elsif ($type =~ /^(echo|ping) ?(.*)/i) { - ctcpreply($nick, 'PING', $2); - -# Log the fact someone tries to DCC + rawout("NOTICE $nick :\001PING $2\001"); +# ctcpreply($nick, uc($1)." $2"); } elsif ($type =~ /^DCC /) { &status("DCC attempt from $who (not supported, ignored)"); - } } -# This subroutine is unlikely to be called... -# It's referenced in src/Irc.pl, but, it doesn't do -# a great deal... sub ctcpReplyParse { my ($nick, $user, $host, $type, $reply) = @_; &status("CTCP $type reply from $nick: $reply"); } + sub ctcpreply { my ($rnick, $type, $reply) = @_; rawout("NOTICE $rnick :\001$type $reply\001"); Index: Channel.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Channel.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -w -u -r1.4 -r1.5 Index: DBM.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/DBM.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -w -u -r1.9 -r1.10 --- DBM.pl 17 Dec 2001 16:39:35 -0000 1.9 +++ DBM.pl 8 Aug 2005 00:24:25 -0000 1.10 @@ -40,6 +40,8 @@ =cut +BEGIN { push @INC, 'src' } # baad, bad juju here + use vars qw(%DBMS $Debug $Init_done $Old_warnings); use Fcntl qw( @@ -94,6 +96,7 @@ postInc set showdb + showtop syncDBM whatdbs withDBMlock @@ -344,7 +347,7 @@ if ($module eq 'GDBM_File') { if ($flags == O_RDONLY) { return GDBM_File::GDBM_READER() } elsif ($flags == O_RDWR) { return GDBM_File::GDBM_WRITER() } - elsif ($flags == O_CREAT|O_RDWR){ return GDBM_File::GDBM_WRCREAT() } + elsif ($flags == (O_CREAT|O_RDWR)){ return GDBM_File::GDBM_WRCREAT() } else { badinvo 0, "unhandled flags $flags for $module" } } @@ -526,7 +529,7 @@ # If locking is active the database might not actually be open (if # called from outside this file, that shouldn't happen when called # internally). - if (!$rdb->[F_HASH]) { + if (!$rdb->[F_HASH] || !tied(%{ $rdb->[F_HASH] })) { print "syncDBM: $dbname skipping sync\n" if $Debug; return; } @@ -937,6 +940,83 @@ }; } +#------------------------------------------------------------------------ +# topofthecharts - dag...@da... +# +# a better top ten which only sorts a small number of things +# (but does it a lot) instead of sorting a huge number of things +# once and then throwing most of them away +sub topofthecharts(&$@) { # &$@#!!! + my $sortfun=shift; + my $numtoreturn=shift; + # and the rest of @_ is the values themselves + + if(scalar(@_)<=$numtoreturn) { + return sort { &$sortfun($a,$b) } (@_) + } + + my @b=sort { $sortfun->($a,$b) } @_[0..$numtoreturn-1]; + + for my $x (@_) { + if( $sortfun -> ( $b[$numtoreturn-1],$x ) == 1 ) { + unshift @b,$x; + @b=sort { $sortfun->($a,$b) } @b[0..$numtoreturn-1]; + } + } + return @b; +} + + +# showtop - aw...@aw... +# +# Shows the top or bottom $num_to_show entries in database $dbname, sorted by +# the rocketship operator. +# +# Currently used only by the topten.pm module. +# Also explodes spectacularly on large dbs. Oops. Disabled for now. +sub showtop { + my ($dbname, $num_to_show, $what_to_show) = @_; + my @result; + my @results; + + if (!$dbname) { + status "no db given"; + status "try showtop <db> <num_to_show>"; + return(); + } + + # default to "top 10" + $num_to_show = 10 if (!$num_to_show); + + my $rdb = $DBMS{$dbname}; + &status("$dbname topten requested, what to show: $what_to_show"); + if (!$rdb) { + status "the database $dbname is not open. try showtop <db> <num_to_show>"; + return(); + } + + with_lock $rdb, LOCK_SH, sub { + my $rhash = $rdb->[F_HASH]; + my %hashlet = %$rhash; + if ($what_to_show =~ /bottom/) + { + @result = topofthecharts { $rhash->{$_[0]} <=> $rhash->{$_[1]} } + $num_to_show, keys %$rhash; + @result = reverse @result; + } + else + { + @result = topofthecharts { $rhash->{$_[1]} <=> $rhash->{$_[0]} } + $num_to_show, keys %$rhash; + } + @results = map { $_." => ".$rhash->{$_} } @result; + + }; + + return @results; +} + + if (!$Init_done) { $^W = $Old_warnings; $Init_done = 1; Index: Help.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Help.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -w -u -r1.7 -r1.8 --- Help.pl 12 Aug 2004 22:54:46 -0000 1.7 +++ Help.pl 8 Aug 2005 00:24:25 -0000 1.8 @@ -26,8 +26,8 @@ $helptopics =~ s/\s+$//; &status("Loaded help file $param{helpfile}"); } else { - $help{"main"} = "Sorry, I couldn't find the help file."; - &status("No help file $param{helpfile}. Don't forget to create it from conf/dist/infobot.help"); + $help{"main"} = "couldn't find the help file"; + &status("No help file $param{helpfile}"); } } @@ -47,15 +47,14 @@ foreach (split(/\n/, $help{$topic})) { &msg($who,$_); } - } elsif ($topic ne 'topics') { - &msg($who, "Sorry, no help on '$topic'."); + } else { + &msg($who, "no help on $topic"); } - if ($topic eq 'main' or $topic eq 'topics' or !$help{$topic}) { - &msg($who, 'Help topics: '.$helptopics.". Use 'help <topic>'."); - } + &msg($who, 'topics: '.$helptopics.". use 'help <topic>'."); return ''; } + 1; Index: Irc.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Irc.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -w -u -r1.8 -r1.9 --- Irc.pl 2 Aug 2004 20:37:22 -0000 1.8 +++ Irc.pl 8 Aug 2005 00:24:26 -0000 1.9 @@ -1,7 +1,16 @@ # infobot :: Kevin Lenzo & Patrick Cole (c) 1997 use Socket; -use POSIX qw(EINTR); + +# checks if Japanese messages should be converted to EUC upon +# receipt. This should only happen if a) Jcode is available, +# and b) the user has requested this feature. This *should* +# work; contact me at aw...@aw... if it doesn't. +my $no_japanese = 0; +eval qq{ + use Jcode qw(); +}; +$no_japanese++ if ($@); sub srvConnect { my ($server, $port) = @_; @@ -27,10 +36,6 @@ } connect(SOCK, $paddr) or die "connect failed: $!"; - my $old = select SOCK; - $| = 1; - select $old; - &status(" connected."); } @@ -107,40 +112,6 @@ } # end of xk functions. -sub pick_new_nick { - my ($base, $new); - - $nicktries++; - - $base = $param{wantNick} . 'x'; - do { - chop $base; - $new = "$base$nicktries"; - } while length $new > 9; - - return $new; -} - -sub get_new_nick { - my ($new_nick) = @_; - - $bot_nick = $new_nick; - $bot_nick_re = "(?i:\Q$bot_nick\E)"; - - my @n = ($bot_nick); - push @n, $param{wantNick} if $bot_nick ne $param{wantNick}; - $addressed_re = "(?i:" - . join('|', map { quotemeta } @n) - . ")"; - - nick($new_nick); # needs (), IrcExtras not compiled yet -} - -sub get_want_nick { - $nicktries = 0; - get_new_nick $param{wantNick}; -} - sub procmode { my ($nick, $user, $host, $e, $f) = @_; my @parts = split (/ /, $f); @@ -248,9 +219,10 @@ } } elsif ($type=~/NICK/) { if ($param{ansi_control}) { - &status(">>> $b_green$nick$ob becomes $b_green$chan$ob"); + &status(">>> ".c($nick,'bold green'). + " materializes into ".c($chan,'bold green')); } else { - &status(">>> $b$nick$ob becomes $b$chan$ob"); + &status(">>> $b$nick$ob materializes into $b$chan$ob"); } } } @@ -258,6 +230,14 @@ sub procevent { my ($nick, $user, $host, $type, $chan, $msg) = @_; + # anonymous submitter++. + # stuck in here by aw...@aw... -- if this causes a problem for + # anyone, please let me know. + if (($no_japanese == 0) && (::getparam('japanese')) && (Jcode::getcode($msg) eq 'jis')) + { + $msg = Jcode::convert($msg,'euc'); + } + # support global $nuh, $who $nuh = "$nick!$user\@$host"; @@ -266,6 +246,8 @@ ## It's a public message on the channel## $chan =~ tr/A-Z/a-z/; + $chan = &channel(lc $chan); + if ($msg =~ /\001(.*)\001/ && $msg !~ /ACTION/) { #### Client To Client Protocol #### parsectcp($nick, $user, $host, $1, $chan); @@ -277,6 +259,7 @@ &IrcActionHook($nick, $chan, $1); } } else { + &channel('purl'); ## Is Private ## if ($msg=~/\001(.*)\001/) { #### Client To Client Protocol #### @@ -288,13 +271,14 @@ } } elsif ($type=~/NOTICE/) { if ($chan =~ /^$ischan/) { - $chan =~ tr/A-Z/a-z/; + $chan =~ &channel(lc $chan); if ($msg !~ /ACTION (.*)/) { &status("-$nick/$chan- $msg"); } else { &status("* $nick/$chan $1"); } } else { + &channel('purl'); if ($msg=~/\001([A-Z]*)\s(.*)\001/) { ctcpReplyParse($nick, $user, $host, $1, $2); } else { @@ -308,9 +292,6 @@ my $msg=$_[0]; my ($ucount, $uc) = (0, 0); if ($msg=~/^001/) { - if ($param{operator}) { - rawout("OPER $param{operName} $param{operPass}"); - } # joinChan(split/\s+/, $param{'join_channels'}); # Line in infobot.config: # join_channels #chan,key #chan_with_no_key @@ -323,25 +304,37 @@ s/,/ /; joinChan ($_); } - } elsif ($msg=~/^NOTICE ($bot_nick_re) :(.*)/) { + $nicktries=0; + } elsif ($msg=~/^NOTICE ($ident) :(.*)/) { serverNotice($1,$2); - } elsif ($msg=~/^332 $bot_nick_re ($ischan) :(.*)/) { + } elsif ($msg=~/^332 $ident ($ischan) :(.*)/) { if ($param{ansi_control}) { &status(">>> topic for $b$1$ob: $2"); } else { &status(">>> topic for $1: $2"); } - } elsif ($msg=~/^333 $bot_nick_re $ischan (.*) (.*)$/) { + } elsif ($msg=~/^333 $ident $ischan (.*) (.*)$/) { if ($param{ansi_control}) { &status(">>> set by $b$1$ob at $b$2$ob"); } else { &status(">>> set by $1 at $2"); } } elsif ($msg=~/^433/) { - my $new = pick_new_nick; - &status("*** Nickname $bot_nick in use, trying $new"); - get_new_nick $new; - } elsif ($msg=~/[0-9]+ $bot_nick_re . ($ischan) :(.*)/) { + ++$nicktries; + if (length($param{wantNick}) > 9) { + $ident = chop $param{wantNick}; + $ident .= $nicktries; + } else { + $ident = $param{wantNick}.$nicktries; + } + if ($param{'opername'}) { + &rawout("OPER $param{opername} $param{operpass}"); + } + $param{nick} = $ident; + &status("*** Nickname $param{wantNick} in use, trying $ident"); + rawout("NICK $ident"); + + } elsif ($msg=~/[0-9]+ $ident . ($ischan) :(.*)/) { my ($chan, $users) = ($1, $2); &status("NAMES $chan: $users"); my $u; @@ -353,7 +346,7 @@ $channels{$chan}{v}{$u}++; } } - } elsif ($msg=~/[0-9]{3} $bot_nick_re(\s$ischan)*?\s:(.*)/) { + } elsif ($msg=~/[0-9]{3} $ident(\s$ischan)*?\s:(.*)/) { &status("$2"); } } @@ -382,7 +375,7 @@ } else { &status(">>> $b$knick$ob was kicked off $b$chan$ob by $b$kicker$ob ($b$why$ob)"); } - if ($knick eq $bot_nick) { + if ($knick eq $ident) { &status("SELF attempting to rejoin lost channel $chan"); &joinChan($chan); } @@ -390,7 +383,7 @@ sub prockill { my ($killer, $knick, $kserv, $killnick, $why) = @_; - if ($knick eq $bot_nick) { + if ($knick eq $ident) { &status("KILLED by $killnick ($why)"); } else { &status("KILL $knick by $killnick ($why)"); @@ -407,27 +400,42 @@ } sub irc { - while (1) { + local ($rin, $rout); + local ($buf, $line); + + $nicktries=0; + $connected=1; + while ($connected) { srvConnect($param{server}, $param{port}); if ($param{server_pass}) { # ksiero++ rawout("PASS $param{server_pass}"); } - get_want_nick; + rawout("NICK $param{wantNick}"); rawout("USER $param{ircuser} $param{ident} $param{server} :$param{realname}"); + if ($param{operator}) { + rawout("OPER $param{operName} $param{operPass}\n"); + } + $param{nick} = $param{wantNick}; + $ident = $param{wantNick}; + + $/ = "\015" if $^O eq "MacOS"; - my $buf = ''; + $rin = fhbits('SOCK'); while (1) { - my $nread = sysread SOCK, $buf, 1024, length $buf; - if (!$nread) { - next if !defined $nread && $! == EINTR; - status_error("read from server failed: ", - defined $nread ? 'EOF' : $!); + ($nfound,$timeleft) = select($rout=$rin, undef, undef, 0); + if ($rout & SOCK) { + if (sysread(SOCK,$buf,1) <= 0) { last; } - while ($buf =~ s/(.*?)[\x0d\x0a]+//) { - sparse($1) if length $1; + if ($buf=~/\n/) { + $line.=$buf; + sparse($line); + undef $line; + } else { + $line.=$buf; + } } } } @@ -443,13 +451,14 @@ sub sparse { $_ = $_[0]; + s/\r//; if (/^PING :(\S+)/) { # Pings are important rawout("PONG :$1"); &status("SELF replied to server PING") if $param{VERBOSITY} > 2; - } elsif (/^:\S+ (\d{3} .*)/) { + } elsif (/^:\S+ ([\d]{3} .*)/) { servmsg($1); - } elsif (/^:([\d\w\_\-\/]+\.[\.\d\w\_\-\/]+) NOTICE ($bot_nick_re) :(.*)/) { + } elsif (/^:([\d\w\_\-\/]+\.[\.\d\w\_\-\/]+) NOTICE ($ident) :(.*)/) { &status("\-\[$1\]- $3"); } elsif (/^NOTICE (.*) :(.*)/) { serverNotice($1, $2); Index: IrcExtras.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/IrcExtras.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -w -u -r1.7 -r1.8 --- IrcExtras.pl 5 Mar 2002 18:05:00 -0000 1.7 +++ IrcExtras.pl 8 Aug 2005 00:24:26 -0000 1.8 @@ -2,6 +2,16 @@ use Socket; +# checks if Japanese messages should be converted to EUC upon +# receipt. This should only happen if a) Jcode is available, +# and b) the user has requested this feature. This *should* +# work; contact me at aw...@aw... if it doesn't. +my $no_japanese=0; +eval qq{ + use Jcode qw(); +}; +$no_japanese++ if ($@); + $| = 1; $SIG{'INT'} = 'killed'; @@ -28,10 +38,6 @@ &quit($quitMsg); &closeDBMAll(); # MUHAHAHAHA. - - # if we have a .pid file, lose it - unlink($pid_file); - exit(1); } @@ -90,7 +96,7 @@ sub quit { my $quitmsg = $_[0]; rawout("QUIT :$quitmsg"); - &status("QUIT $bot_nick has quit IRC ($quitmsg)"); + &status("QUIT $param{nick} has quit IRC ($quitmsg)"); close(SOCK); } @@ -153,8 +159,19 @@ sub rawout { $buf = $_[0]; - $buf =~ s/\n//g; - print SOCK "$buf\x0d\x0a"; + + # anonymous submitter++. + # stuck in here by aw...@aw... -- if this causes a problem for + # anyone, please let me know. + if (($no_japanese == 0) && (::getparam('japanese')) && (Jcode::getcode($buf) eq 'euc')) + { + $buf = Jcode::convert($buf,'jis'); + } + + $buf =~ s/\n//gi; + select(SOCK); $| = 1; + print SOCK "$buf\n"; + select(STDOUT); } 1; Index: Misc.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Misc.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -w -u -r1.6 -r1.7 --- Misc.pl 24 Jan 2002 11:44:10 -0000 1.6 +++ Misc.pl 8 Aug 2005 00:24:26 -0000 1.7 @@ -46,12 +46,12 @@ sub status { $statcount++; - my($input) = join $,, @_; + my($input) = @_; if ($param{'VERBOSITY'} > 0) { if ($param{ansi_control}) { printf $_green."[%5d] ".$ob, $statcount; - $input =~ tr/\x00-\x1a\x1c-\x1f//d;# (Derek Moeller)++ + $input =~ s/[\cA-\c_]//ig; # (Derek Moeller)++ my $printable = $input; if ($printable =~ s/^(<\/\S+>) //) { @@ -82,9 +82,6 @@ } elsif ($printable =~ s/^(enter:|update:|forget:) //) { # something that should be SEEN print "$b_green$1 $printable$ob\n"; - } elsif ($printable =~ s/^(ERROR:) //) { - # from status_error() - print "$b_white$on_red$1 $printable$_reset\n"; } else { print "$printable\n"; } @@ -97,10 +94,6 @@ &log_line("[$statcount] ".$input); } -sub status_error { - status "ERROR: ", @_; -} - sub performSay { my($in) = @_; if (!defined($prevIn)) { $prevIn = ""; }; @@ -135,7 +128,7 @@ if ($param{'logfile'} ne '') { $line =~ s/\n*$/\n/; - open(TRACK, ">>$param{basedir}/$param{logfile}"); + open(TRACK, ">>$param{logfile}"); $loglines++; $total_loglines++; @@ -167,3 +160,7 @@ } 1; + +__DATA__ + +/dimer\[0\/: trailing \ in regexp at /usr/users/infobot/infobot-current/src/Misc.pl line 164, <FH> chunk 98. Index: Norm.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Norm.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -w -u -r1.3 -r1.4 --- Norm.pl 2 Aug 2004 20:22:53 -0000 1.3 +++ Norm.pl 8 Aug 2005 00:24:26 -0000 1.4 @@ -85,10 +85,10 @@ $in =~ s/(^|\W)you\'?re(\W|$)/$1you are$2/ig; if ($addressed > 0) { - $in =~ s/(^|\W)are you(\W|$)/$1is $param{wantNick}$2/ig; - $in =~ s/(^|\W)you are(\W|$)/$1$param{wantNick} is$2/ig; - $in =~ s/(^|\W)you(\W|$)/$1$param{wantNick}$2/ig; - $in =~ s/(^|\W)your(\W|$)/$1$param{wantNick}\'s$2/ig; + $in =~ s/(^|\W)are you(\W|$)/$1is $param{'nick'}$2/ig; + $in =~ s/(^|\W)you are(\W|$)/$1$param{'nick'} is$2/ig; + $in =~ s/(^|\W)you(\W|$)/$1$param{'nick'}$2/ig; + $in =~ s/(^|\W)your(\W|$)/$1$param{'nick'}\'s$2/ig; } $in; Index: Params.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Params.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -w -u -r1.4 -r1.5 Index: Process.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Process.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -w -u -r1.9 -r1.10 --- Process.pl 2 Aug 2004 20:37:22 -0000 1.9 +++ Process.pl 8 Aug 2005 00:24:26 -0000 1.10 @@ -4,23 +4,24 @@ $SIG{'ALRM'} = 'TimerAlarm'; -use Fcntl (); - sub process { ($who, $msgType, $message) = @_; my ($result, $caughtBy); $origMessage = $message; # intentionally global - return 'SELF' if (lc($who) eq lc($bot_nick)); + return 'SELF' if (lc($who) eq lc($param{'nick'})); $message =~ s/[\cA-\c_]//ig; # strip control characters $msgFilter = "NOFILTER"; # 26Jun19100 - Masque # $msgFilter = $1 if $message =~ s/\s+(?:=~)\s?\/\(\?:(.*?)\)\/i?\s*//; -# STILL doesn't match '=~ /(?:(toot!))/'! Grah. Could make this simpler, but this is fun. 29Jun2K - Masque. + # STILL doesn't match '=~ /(?:(toot!))/'! Grah. Could make this + # simpler, but this is fun. 29Jun2K - Masque. # FIXME - $msgFilter = ($1 || $2) if $message =~ s!\s+(?:=~)?\s?/(?:\((?:\?:)?([^)]*)\)|([^()]*))/i?\s*$!!; - + $msgFilter = ($1 || $2) + if $message =~ s,\s+(?:=~)? + \s?/ + (?:\((?:\?:)?([^)]*)\)|([^()]*))/i?\s*$,,x; $addressed = 0; $karma = 0; # 12Apr2k - Masque @@ -38,6 +39,13 @@ return 'INTERBOT'; } + if ($msgType =~ /public/ + and $message =~ /((?:http|ftp|mailto|telnet|file|https):\S+)/) { + $url=$1; + status("Stashing URL $url"); + mentionURL(channel(),$url,$who); + } + return 'INTERBOT' if $message =~ /^...but/; return 'INTERBOT' if $message =~ /^.* already had it that way/; return 'INTERBOT' if $message =~ /^told /; # reply from friendly infobot @@ -48,24 +56,22 @@ # this assumes that the ignore list will be fairly small, as we # loop through each key rather than doing a straight lookup # -- this should be moved and made more efficient -- kl - if (withDBMlock 'ignore', Fcntl::LOCK_SH, sub { if (&get(ignore => $uh) or &get(ignore => $who)) { - return 1; + &status("IGNORE <$who> $message"); + return 'IGNORE'; } + foreach (&getDBMKeys('ignore')) { my $ignoreRE = $_; my @parts = split /\*/, "a${ignoreRE}a"; my $recast = join '\S*', map quotemeta($_), @parts; $recast =~ s/^a(.*)a$/$1/; if ($nuh =~ /^$recast$/) { - return 1; - } - } - return 0; - }) { &status("IGNORE <$who> $message"); return 'IGNORE'; } + } + # -- -- if ($msgType =~ /private/ and $message =~ s/^:INFOBOT://) { @@ -99,7 +105,8 @@ &status(":INFOBOT:REPLY $who: $message"); my ($X, $V, $Y) = $item =~ /^(.*?) =(.*?)=> (.*)/; - if ((getparam('acceptUrl') !~ /REQUIRE/) or ($Y =~ /(http|ftp|mailto|telnet|file):/)) { + if ((getparam('acceptUrl') !~ /REQUIRE/) or + ($Y =~ /(http|ftp|mailto|telnet|file):/)) { &set($V, $X, $Y); &msg($target, "$who knew: $X $V $Y"); } @@ -110,7 +117,6 @@ } $VerifWho = &verifyUser($nuh); - if ($VerifWho) { if (IsFlag("i") eq "i") { &status("Ignoring $who: $VerifWho"); @@ -152,10 +158,14 @@ # see User.pl for the "special" user commands return 'NOREPLY' if &userProcessing() eq 'NOREPLY'; + # make this more Comic Chat friendly + if ( ::getparam('comicchat') ) { + $message =~ s/\(\#G[^\)]*\)//; + } + if ($msgType !~ /public/) { $addressed = 1; } - if (($message =~ s/^(no,?\s+$addressed_re,?\s*)//i) - or ($message =~ s/^($addressed_re\W?\s+no,\s*)//i) + if (($message =~ s/^(no,?\s+$param{'nick'},?\s*)//i) or ($addressed and $message =~ s/^(no,?\s+)//i)) { # clear initial negative # an initial negative may signify a correction @@ -165,7 +175,7 @@ $correction_plausible = 0; } - if ($message =~ /^\s*$addressed_re\s*\?*$/i) { + if ($message =~ /^\s*$param{'nick'}\s*\?*$/i) { &status("feedback addressing from $who"); $addressed = 1; $blocked = 0; @@ -184,8 +194,8 @@ return "FEEDBACK"; } - if (($message =~ /^\s*$addressed_re\s*([\,\:\> ]+) */i) - or ($message =~ /^\s*$addressed_re\s*-+ *\??/i)) { + if (($message =~ /^\s*$param{'nick'}\s*([\,\:\> ]+) */i) + or ($message =~ /^\s*$param{'nick'}\s*-+ *\??/i)) { # i have been addressed! my($it) = $&; @@ -196,7 +206,7 @@ } } - if ($message =~ /, ?$addressed_re(\W+)?$/i) { # i have been addressed! + if ($message =~ /, ?$param{nick}(\W+)?$/i) { # i have been addressed! my($it) = $&; if ($` !~ /^\s*i?s\s*$/i) { $xxx = quotemeta($it); @@ -211,8 +221,10 @@ $lastaddressedby = $who; $lastaddressedtime = time(); + my $channel; if ($message =~ /^showmode/i ) { if ($msgType =~ /public/) { + $channel = &channel(); if ((getparam('addressing') ne 'REQUIRE') or $addressed) { &performSay ($who.", addressing is currently ".getparam('addressing')); } @@ -222,7 +234,6 @@ return "SHOWMODE"; } - my $channel = &channel(); $continuity = 0; } else { # apparently not addressed @@ -252,20 +263,20 @@ # $confusedRE = join '|', map quotemeta($_), @confused unless defined $confusedRE; # return 'CONFUSED' if $message =~ /$confusedRE/; - return if ($who eq $bot_nick); + return if ($who eq $param{'nick'}); $message =~ s/^\s+//; # strip any dodgey spaces off # Half finished thought here - "^Pudge - it's there" looks like math but is # often nick completion or similar. - # if (($message =~ s/^(\S+)\s*:\s+//) or ($message =~ s/^(\S+)\s+--?\s+[.\d]//)) { - if (($message =~ s/^(\S+)\s*:\s+//) or ($message =~ s/^(\S+)\s+--+\s+//)) { + # if (($message =~ s/^\S+\s*:\s+//) or ($message =~ s/^\S+\s+--?\s+[.\d]//)) { + if (($message =~ s/^\S+\s*:\s+//) or ($message =~ s/^\S+\s+--+\s+//)) { # stripped the addressee ("^Pudge: it's there") $reallyTalkingTo = $1; } else { $reallyTalkingTo = ''; if ($addressed) { - $reallyTalkingTo = $bot_nick; + $reallyTalkingTo = $param{'nick'}; } } @@ -310,7 +321,7 @@ $caughtBy = "tell"; } - if ($target eq $bot_nick) { + if ($target eq $param{'nick'}) { $result = "Isn\'t that a bit silly, ".$who."?"; $target = $who; $caughtBy = "tell"; @@ -332,9 +343,7 @@ if ($continuity or $addressed or (getparam('addressing') ne "REQUIRE")) { - if (defined ($result = &myRoutines())) { - $caughtBy = "myRoutines"; - } elsif (defined($result = &Extras())) { + if (defined($result = &Extras())) { $caughtBy = "Extras"; # BEEP BEEP - TODO ALERT: Change the karma lookup to do a doQuestion # before returning a karma query to catch factoids that should return @@ -435,3 +444,4 @@ } 1; + Index: Question.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Question.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -w -u -r1.3 -r1.4 --- Question.pl 2 Aug 2004 20:22:53 -0000 1.3 +++ Question.pl 8 Aug 2005 00:24:26 -0000 1.4 @@ -58,10 +58,6 @@ return 'NOREPLY'; } - if (not defined $answer) { - $answer = &math($qmsg); # clean up the argument syntax for this later - } - if ($questionWord ne "" or $finalQMark) { # if it has not been explicitly marked as a question if ($addressed && (not defined $answer)) { Index: Reply.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Reply.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -w -u -r1.10 -r1.11 --- Reply.pl 2 Aug 2004 20:37:22 -0000 1.10 +++ Reply.pl 8 Aug 2005 00:24:26 -0000 1.11 @@ -18,19 +18,7 @@ my $literal = ($locMsg =~ s/^literal //); - if (getparam('rss') and $message =~ m/^perlfaq\'\s+(.*?)\?*$/) { - # specially defined type. get and process an RSS (RDF Site Summary) - eval "use URI::Escape"; - not ($@) and do { - my $q = uri_escape($1, '\W'); - my $result = &get_headlines("http://www.perlfaq.com/cgi-bin/rss/kw?q=$q"); - if ($result =~ s/^error: //) { - return "$who: couldn't get the perlfaq: $result"; - } else { - return "$who: $result"; - } - } - } elsif ($result = get("is", $locMsg)) { + if ($result = get("is", $locMsg)) { # &status("exact: $message =is=> $result"); $theVerb = "is"; $X = $message; @@ -297,10 +285,10 @@ if ($theMsg =~ s/^$safeWho is/you are/i) { # fix the person } else { - $theMsg =~ s/^$addressed_re is /i am /ig; - $theMsg =~ s/ $addressed_re is / i am /ig; - $theMsg =~ s/^$addressed_re was /i was /ig; - $theMsg =~ s/ $addressed_re was / i was /ig; + $theMsg =~ s/^$param{'nick'} is /i am /ig; + $theMsg =~ s/ $param{'nick'} is / i am /ig; + $theMsg =~ s/^$param{'nick'} was /i was /ig; + $theMsg =~ s/ $param{'nick'} was / i was /ig; if ($addressed) { $theMsg =~ s/^you are (\.*)/i am $1/ig; @@ -374,3 +362,4 @@ } 1; + Index: Search.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Search.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 Index: Setup.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Setup.pl,v retrieving revision 1.12 retrieving revision 1.13 diff -w -u -r1.12 -r1.13 --- Setup.pl 12 Aug 2004 22:54:46 -0000 1.12 +++ Setup.pl 8 Aug 2005 00:24:26 -0000 1.13 @@ -14,7 +14,7 @@ &status($params); } - die "dbname is null\n(did you remember to create conf/infobot.config from conf/dist/infobot.config?)\n " if (!$param{'dbname'}); + die "dbname is null" if (!$param{'dbname'}); %dbs = ("is" => "$param{basedir}/$param{dbname}-is", "are" => "$param{basedir}/$param{dbname}-are"); @@ -31,10 +31,6 @@ $qCount = &get("is", "the qCount"); $qEpochTime = &get("is", "the qEpochTime"); - # things to say when people thank me - @welcomes = ('no problem', 'my pleasure', 'sure thing', - 'no worries', 'de nada', 'de rien', 'bitte', 'pas de quoi'); - # when i'm cofused and I have to reply @confused = ("huh?", "what?", @@ -49,8 +45,6 @@ 'no idea', 'bugger all, i dunno'); - - # check the ignore parameter for a filename containing the # ignore list @@ -97,6 +91,20 @@ &openDBMx('seen'); } + if ($param{'seenurls'}) { + &openDBMx('seenurls'); + } + + # if ($param{'topten'}) { + # &openDBMx('topten'); + # } + + foreach $chan (split(/\s+/, $::param{'allowed_channels'})) { + # Initialize the topten database. -- rs 10.jun'04 + my $workname = substr(lc $chan, 1); + &openDBMx("topten/$workname"); + } + # set up the users and ops &status("Parsing User File"); &parseUserfile(); @@ -105,18 +113,6 @@ # set up the channel file &parseChannelfile(); - # ways to say hello - @hello = ('hello', - 'hi', - 'hey', - 'niihau', - 'bonjour', - 'hola', - 'salut', - 'que tal', - 'privet', - "what's up"); - $param{'maxKeySize'} ||= 30; # maximum LHS length $param{'maxDataSize'} ||= 200; # maximum total length @@ -132,8 +128,13 @@ # do this ONCE per startup to amortize. Still too much mem. #&getAllKeys; + &status("Getting factoid counts"); + &status(" Counting 'is'..."); $isCount = &getDBMKeys('is'); + &status(" $isCount 'is' factoids"); + &status(" Counting 'are'..."); $areCount = &getDBMKeys('are'); + &status(" $areCount 'are' factoids"); $factoidCount = $isCount + $areCount; &status("setup: $factoidCount factoids; $isCount IS; $areCount ARE"); @@ -144,15 +145,27 @@ my $initdebug = 1; $param{'DEBUG'} = $initdebug; - if (!@paramfiles) { + my $defaultfile; + unless ($paramfile) { # if there is no list of param files, just go for the default # (usually ./files/infobot.config) - @paramfiles = ("$param{confdir}/infobot.config"); + $paramfile = "$param{confdir}/infobot.config"; + $defaultfile++; + } + + if (! -e $paramfile) { + if ($defaultfile) { + die "Hey, this looks you're running this for the first time!\nPerhaps you should rename the -dist files in the conf/ subdirectory and\nedit them to your liking.\n" + } + else { + die "Can't find specified configuration file $paramfile.\n" + } } # now read in the parameter files - &loadParamFiles(@paramfiles); + &loadParamFiles($paramfile); } + 1; Index: Statement.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Statement.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -w -u -r1.7 -r1.8 --- Statement.pl 2 Aug 2004 20:37:22 -0000 1.7 +++ Statement.pl 8 Aug 2005 00:24:26 -0000 1.8 @@ -12,7 +12,7 @@ ## sub doStatement { - return '' if (lc($who) eq lc($bot_nick)); + return '' if (lc($who) eq lc($param{'nick'})); my($msgType, $in) = @_; @@ -28,7 +28,9 @@ $in =~ s/(^|\s)you are /$1$param{'ident'} is /i; } - $in =~ s/^no,\s+//i; # don't want to complain if it's new but negative + + # don't want to complain if it's new but negative + $correction_plausible = 1 if($in =~ s/^no,\s+//i); if (getparam('plusplus')) { Index: Update.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Update.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -w -u -r1.4 -r1.5 --- Update.pl 2 Aug 2004 20:22:53 -0000 1.4 +++ Update.pl 8 Aug 2005 00:24:26 -0000 1.5 @@ -10,8 +10,6 @@ $lhs =~ s/^some(one|1|body) said //i; $lhs =~ s/ +/ /g; - if (($lhs =~ m/-\s*$/)&&(!$addressed)) { return; } - # this really needs cleaning up if ($verb eq "is") { $also = ($rhs =~ s/^also //i); @@ -131,9 +129,9 @@ if ($addressed) { &status("FAILED update: \'$lhs =$verb=> $rhs\'"); if ($msgType =~ /public/) { - &performSay("...but $lhs are $exists..."); + &performSay("...but $lhs is $exists..."); } else { - &msg($who, "...but $lhs are $exists.."); + &msg($who, "...but $lhs is $exists.."); } } else { &status("FAILED update: $lhs $verb $rhs (not addressed, no reply)"); @@ -141,6 +139,11 @@ # ignore it. return 'NOREPLY'; } + if ($msgType =~ /public/) { + &performSay("...but $lhs are $exists..."); + } else { + &msg($who, "...but $lhs are $exists..."); + } } else { if ($msgType =~ /public/) { &performSay("okay, $who.") unless $rhs eq $exists; Index: User.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/User.pl,v retrieving revision 1.12 retrieving revision 1.13 diff -w -u -r1.12 -r1.13 --- User.pl 12 Aug 2004 22:54:46 -0000 1.12 +++ User.pl 8 Aug 2005 00:24:26 -0000 1.13 @@ -8,7 +8,9 @@ %user = (); @userList = (); - if(open(FH, $file)) { + open(FH, $file) + or die "Could not open $file ($!). Perhaps you forgot to rename the example file in conf/infobot.users-dist?\n"; + while (<FH>) { if (!/^#/ && defined $_) { if (/^UserEntry\s+(.+?)\s/) { @@ -16,7 +18,7 @@ $workname = $1; if (/\s*\{\s*/) { while (<FH>) { - if (/^\s*(\w+)\s+(.+);\s*$/) { + if (/^\s*(\w+)\s+(.+);$/) { $opt = $1; $val = $2; $val =~ s/\"//g; if ($opt =~ /^mask$/i) { @@ -52,10 +54,6 @@ } } } - else { - &status("No user file $param{userList}. Don't forget to create it from conf/dist/infobot.users"); - } -} sub IsFlag { my $flags = $_[0]; @@ -74,6 +72,7 @@ } sub verifyUser { + my $lnuh = $_[0]; my ($u, $m); my $VerifWho; @@ -92,15 +91,12 @@ my $now = time(); - my @seen = ($now); - if ($msgType =~ /public/) { - push @seen, channel(), $message; - } - else { - push @seen, '', "<private message>"; + my $m = $message; + if ($msgType !~ /public/) { + $m = "<private message>"; } - push @seen, $param{'ircNetName'} || ''; - &set('seen', lc $who, join $;, @seen); + &set('seen', lc $who, $now.$;.channel().$;.$m); + &postInc('topten/'.substr(lc channel(), 1), lc $who); # add one to the counter of what this user has said if ($VerifWho) { $uFlags = $user{$VerifWho."flags"}; @@ -288,7 +284,7 @@ if ($VerifWho) { if ($msgType =~ /private/) { - my $unverified_message = "you must identify yourself; /msg $bot_nick <pass> <command>"; + my $unverified_message = "you must identify yourself; /msg $param{nick} <pass> <command>"; if (IsFlag("e")) { # eval if ($message =~ s/^(\S+) eval//) { @@ -433,3 +429,4 @@ } 1; + |
Update of /cvsroot/infobot/infobot/extras In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23035/extras Removed Files: ANSI.pl Aviation.pl DNS.pl Extras.pl Internic.pl Math.pl NOAA.pl RDF.pl Slashdot3.pl Speller.pl Traceroute.pl W3Search.pl Zappa.pl Zippy.pl babel.pl ebay.pl exchange.pl excuse.pl gender.pl imdb.pl insult.pl module-template myRoutines.pl nickometer.pl purldoc.pl stockquote.pl units.pl Log Message: Bringing CVS in line with that which is running as purl. Previous version tagged as 'oscon2005' for no particular reason other than date. --- ANSI.pl DELETED --- --- Aviation.pl DELETED --- --- DNS.pl DELETED --- --- Extras.pl DELETED --- --- Internic.pl DELETED --- --- Math.pl DELETED --- --- NOAA.pl DELETED --- --- RDF.pl DELETED --- --- Slashdot3.pl DELETED --- --- Speller.pl DELETED --- --- Traceroute.pl DELETED --- --- W3Search.pl DELETED --- --- Zappa.pl DELETED --- --- Zippy.pl DELETED --- --- babel.pl DELETED --- --- ebay.pl DELETED --- --- exchange.pl DELETED --- --- excuse.pl DELETED --- --- gender.pl DELETED --- --- imdb.pl DELETED --- --- insult.pl DELETED --- --- module-template DELETED --- --- myRoutines.pl DELETED --- --- nickometer.pl DELETED --- --- purldoc.pl DELETED --- --- stockquote.pl DELETED --- --- units.pl DELETED --- |
From: Masque <qi...@us...> - 2005-08-07 21:16:24
|
Update of /cvsroot/infobot/infobot/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25552/modules Log Message: Directory /cvsroot/infobot/infobot/modules added to the repository |
From: Tim R. <tim...@us...> - 2004-11-08 20:06:13
|
Update of /cvsroot/infobot/infobot/conf/dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17394/conf/dist Modified Files: infobot.config Log Message: defaults Index: infobot.config =================================================================== RCS file: /cvsroot/infobot/infobot/conf/dist/infobot.config,v retrieving revision 1.1 retrieving revision 1.2 diff -w -u -r1.1 -r1.2 --- infobot.config 12 Aug 2004 22:54:45 -0000 1.1 +++ infobot.config 8 Nov 2004 20:06:03 -0000 1.2 @@ -12,13 +12,13 @@ # out options you don't want. # the internal name for this bot -ident i-bot +ident infobot # the nickname we want wantNick $ident # the prefix of the dbm files -dbname $ident +dbname conf/$ident # where to put logging info logfile $dbname.log |
From: Tim R. <tim...@us...> - 2004-11-08 20:04:38
|
Update of /cvsroot/infobot/infobot/extras In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16979/extras Modified Files: babel.pl Log Message: fixme Index: babel.pl =================================================================== RCS file: /cvsroot/infobot/infobot/extras/babel.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -w -u -r1.3 -r1.4 --- babel.pl 2 Aug 2004 20:22:52 -0000 1.3 +++ babel.pl 8 Nov 2004 20:04:15 -0000 1.4 @@ -132,6 +132,7 @@ $translated =~ s/\n/ /g; $translated =~ s/:?\s*$//; + # FIXME: irc IS unicode, stop doing this if ($no_babel_unicode) { &main::status("Warning: Babel requires Unicode::String to handle non-ASCII characters"); return $translated; |
From: Tim R. <tim...@us...> - 2004-08-12 22:57:25
|
Update of /cvsroot/infobot/infobot/conf/dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24826 Added Files: infobot.users Removed Files: infobot.users-dist Log Message: conf/*-dist files are now in conf/dist/ --- NEW FILE: infobot.users --- # # User File (c) 1998 Infobot & Associates # # FLAGS # ---------------------- # i Ignored Flag # f MLF Usage Allowed # t Teaching Allowed # r Removing Allowed # m Modifying Allowed # c Part/Join Allowed # s Searching Allowed (possibly computationally expensive) # S user can make bot Say things # e Extra Privs [ not implemented robustly: AVOID ] # p oP on channel by public request # ---------------------- # o Owner Flag # ---------------------- # # recommended default user flags: +trmc UserEntry default { flags +trmcs; } # here's an example entry UserEntry oznoid { name "Tim Riker"; title "that new guy"; flags +ftrmcsSope; pass xxfxfIfoJHdYg; mask timriker!ti...@ri...; } UserEntry oznoid { name "Kevin A. Lenzo"; title "that guy"; flags +ftrmcsSope; pass rrmrxB6U4ryRk; mask *!lenzo@*.speech.cs.cmu.edu; } UserEntry plonk { name "Eep Malloy" title "that guy II"; flags +trmcspo; pass rrmrxB6U4ryRk; mask *!*@*.static.telerama.com } --- infobot.users-dist DELETED --- |
From: Tim R. <tim...@us...> - 2004-08-12 22:54:58
|
Update of /cvsroot/infobot/infobot/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24368/src Modified Files: Help.pl Setup.pl User.pl Log Message: conf/*-dist files are now in conf/dist/ Index: Help.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Help.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -w -u -r1.6 -r1.7 --- Help.pl 2 Aug 2004 20:37:22 -0000 1.6 +++ Help.pl 12 Aug 2004 22:54:46 -0000 1.7 @@ -27,7 +27,7 @@ &status("Loaded help file $param{helpfile}"); } else { $help{"main"} = "Sorry, I couldn't find the help file."; - &status("No help file $param{helpfile}. Don't forget to create it from infobot.help-dist"); + &status("No help file $param{helpfile}. Don't forget to create it from conf/dist/infobot.help"); } } Index: Setup.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Setup.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -w -u -r1.11 -r1.12 --- Setup.pl 2 Aug 2004 20:37:22 -0000 1.11 +++ Setup.pl 12 Aug 2004 22:54:46 -0000 1.12 @@ -14,7 +14,7 @@ &status($params); } - die "dbname is null\n(did you remember to create conf/infobot.config from infobot.config-dist?)\n " if (!$param{'dbname'}); + die "dbname is null\n(did you remember to create conf/infobot.config from conf/dist/infobot.config?)\n " if (!$param{'dbname'}); %dbs = ("is" => "$param{basedir}/$param{dbname}-is", "are" => "$param{basedir}/$param{dbname}-are"); Index: User.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/User.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -w -u -r1.11 -r1.12 --- User.pl 2 Aug 2004 20:37:22 -0000 1.11 +++ User.pl 12 Aug 2004 22:54:46 -0000 1.12 @@ -53,7 +53,7 @@ } } else { - &status("No user file $param{userList}. Don't forget to create it from infobot.users-dist"); + &status("No user file $param{userList}. Don't forget to create it from conf/dist/infobot.users"); } } |
From: Tim R. <tim...@us...> - 2004-08-12 22:54:58
|
Update of /cvsroot/infobot/infobot/conf/dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24368/conf/dist Added Files: infobot.config infobot.help infobot.users-dist Log Message: conf/*-dist files are now in conf/dist/ --- NEW FILE: infobot.config --- # parameter settings file for the infobot # kevin lenzo (le...@cs...) # note: # '$var' means a parameter that has been named; it is interpolated. # By convention, things with '.ext' (extensions) are text files, and # things with hyphens in them are DBM file prefixes, used for run-time # learning or state maintenance. # # Nota Bene: Comment out attributes you don't want. Note that the # word "false" is actually a true value! use 0 or comment # out options you don't want. # the internal name for this bot ident i-bot # the nickname we want wantNick $ident # the prefix of the dbm files dbname $ident # where to put logging info logfile $dbname.log # plusplus, an idea hijacked from CMU zephyr community, # and dkindred++ in particular. Otherwise known # as 'karma'. this is persistant between shutdowns. plusplus $dbname-karma # persistant "seen" db seen $dbname-seen # do we have an ignore database? uncomment this if not. ignore $dbname-ignore # should we ALWAYS sync dbm on update? # some systems don't do commitment until quit. # shared DBMs always sync after every update. # # 0 => never force sync # 1 => force sync on every update # N => force sync every Nth update commitDBM 5 # Explicitly set the database module. The default is AnyDBM_File. #DBMModule DB_File # Specify an extension which should be added to all database names. By # default this is empty. #DBMExt .db # Specify which databases will be shared among multiple infobots on the # same machine, and so require locking. By default none are shared. # This can be a list of database names, or /all (which means every # database), or /all-but-ignore (which means every database except the # ignore list). # # As of this writing, the databases are: # # is main database, for singular factoids # are main database, for plural factoids # ignore ignored nicks and user/host patterns # plusplus karma # seen last seen info for each nick #sharedDBMs is are plusplus #sharedDBMs /all #sharedDBMs /all-but-ignore # If you're sharing your seen database, you should set ircNetName. # It's prepended to the channel name ("Foo was last seen on EFNet/#perl # ..."). #ircNetName Somenet # X is Y # max length of X (the key, # the 'left hand side' (LHS) of an assignment, # or the first argument) maxKeySize 50 # max length of Y (value or data, the 'right hand side', or 2nd argument) maxDataSize 400 # REQUIRE, OPTIONAL, REJECT for different behaviour with URLs # REQUIRE means it will need to be a url type (e.g. file:, http:) # OPTIONAL will take anything # REJECT will not accept any urls. this makes it easy to # run 2 with different nicks and styles. acceptUrl OPTIONAL # IRC-related params ircuser $ident realname $ident server irc.infobot.org port 6667 allowed_channels #infobot #$ident #test # channels to join # use #channel,key (thanks to tile++) for keyed channels join_channels #infobot #$ident # server password, if needed # server_pass myserverpassword # vhost support... if you have a vhost, you can use this, # otherwise it won't work. # inm++, elph++ for this :) # vhost_name f00.bar.org # nickServ_pass foo # chanServ_pass bar # addressing is when you name the bot. if this is REQUIRE, # the bot should only speak when spoken to. BUT it may listen. # anything else will mean it can barge in when it thinks it # knows something. # "shutup" determines whether you can switch modes on the # fly with the bot. if you use REQUIRE for addressing, you # probably want to comment out the shutup line. addressing OPTIONAL # shutup TRUE # use shortened seen messages (requires that you have # Time::Duration installed for this to do anything) short_time 1 # If you want then 'seen' function to return a timezone # too, put it below: # timezone GMT-7 # If you've set addressing to optional, you might start # triggering lots of long factoid recitals from the bot, # so the crop value below, if you uncomment it, # allows you to limit how much the bot will spew if it's # unaddressed. # crop 90 # ansi screen control is available from 0.32 onwards # value of 1 means to use ANSI, 0 means generic bold ansi_control 1 # things we may or may not want to allow. 1 = allow, 0 otherwise. # do you want to be a desktop calc? perlMath 1 # do you want to allow DNS lookup/Internic/Traceroute? allowDNS 1 allowTraceroute 1 allowInternic 1 # ord/chr etc allowConv 1 # tell so-and-so about such-and-such allowTelling 1 # let any old joe update stuff. if this is 0, you'll have to # either change some code, do everything with e.g. update_db, # or do something else arcane to get factoids in. allowUpdate 1 # How much verbage to display on the console VERBOSITY 1 # the magic hack word to unignore everyone unignoreWord unignore-everyone # where configuration and help files and such live, the default is the # conf subdir of the main directory. Setting it to simply "conf" here # means to use the conf subdir of the current directory instead. #confdir conf # my help file. this will get confdir prepended # you may want to change this to $ident.help helpfile infobot.help # within how long of getting the same reply should # we not respond (irc mode only). in seconds. repeatIgnoreInterval 8 # in what contexts do we let people make the bot leave a # channel (this is an or'd list; public private) allowLeave public # our user list default file (in confdir) # you may want to change this to $ident.users userList infobot.users # channel list, specifies options which differ from the defaults, by # channel. channelList infobot.channels # default quit message quitMsg regrouping; bbiab # how long does something have to be before we'll just volunteer # the answer without a question mark, question, or being addressed minVolunteerLength 8 # other bots to ask for help # friendlyBots url purl script mrapi # sane defines that ALWAYS overwrite existing values at startup # this is a prefix for the files (sane-is.txt, sane-are.txt) sanePrefix sane # allow weather and METAR lookups, respectively. These should # actually be turned into a user modes. mendel++. Require # LWP and metar requires Geo::METAR. weather true metar true # babelfish translator. jdf++. requires LWP, not included. babel true # slashdot headlines. requires LWP, not included. get it from CPAN. slash true # insult and excuse servers insult true excuse true # # < Web Search Config > # # There are lots of things to configure here, if you want # to have your bot searching the interweb using popular # search-engines... # # We use WWW::Search as our front-end, which means you need # it installed if you want this to work. # # By default, if you search for something, get results, and # a factoid doesn't exist for that something, the results # will be added as a factoid. Changing the below value # to 'force' will set the factoid regardless of if there # already existed one. wwwsearch update # Assuming you want to search Google, you need to use their # SOAP::Lite interface. This requires that you have the very # latest WWW::Search::Google installed (the one that requires # SOAP::Lite). You will be wanting a Key from Google too # which you can get at: http://www.google.com/apis/ and which # you'll wanna paste below instead of those nasty x's. googlekey xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # If you want the title of Search results printed, uncomment # the lines below. You can alter max_summary to change the # maximum length of a summary (this is a soft-limit)... # search_summaries TRUE # max_summary 10 # This number sets the max number of results you'll get from the # search engine. Anything above ten is silly, and most won't # get printed. If you have summaries turned on, anything above # three is silly for the same reason. Stick with three. search_count 3 # </ Web Search Config > # general headline-getter. uses RDF. (LotR++) rss true # purldoc perl documentation lookup DMasque++, HJ++ purldoc true purldoc_trigger purldoc purldoc_max_public 3 # speller. requires the ispell program. ispell true #zippy quotes (infobot, yow or infobot, be zippy) zippy true # zappa quotes (be zappa) zappa true # the magic 8ball (divine) magic8_answers $confdir/magic8.txt # exchange rates (exchange 233 DEM to USD) exchange true # stock quotes stockquotes true # ebay auction status ebay true # convert between units like units(1) convert true # gender lookups and name-statistics gender true # IMDB Lookups... imdb true # Clever RSS (EXPERIMENTAL) #clever_rss true --- NEW FILE: infobot.help --- main: Hi, I'm an infobot. I learn mainly by observing declarative statements such as "x is at http://www.xxx.com", and then reply when people ask things like "Where can I find x?". author: oznoid (mailto:le...@ri...) is my author. corrections: If I come back with "...but x is at http://xx.xx.xx" or something like that, and you want to change the entry, use "no, x is at http://sdfsdfsdf". The "No" tells me to supercede the existing value. corrections: You can add to an entry with "also". "X is also at ..." status: Ask me "status" to get a status report on this session. reply: There is a special tag, <reply>, that is used to override the usual response. Usually, a response is "X is Y", but it can be made "Y" by making the entry "X is <reply> Y". reply: This is a good way to prevent me from learning a factoid for a particular entry; use "X is <reply>" with nothing after it. alternation: The | symbol in an entry causes an infobot to choose one of the replies at random. "X is Y|Z" will produce "X is Y" or "X is Z" randomly. alternation: You can weight alternate entries; "X is Y|<3>Z" is three times more likely to return "Z" than it is "X". forget: To make me forget a factoid X, tell me "forget X". karma: Karma is a community rating system. use "X++" to increase the karma, or "X--" to decrease it. Ask for ratings using "karma for X?" tell: You can ask me to send someone a message. To have me send the factoid "X" to the user "Y", say "tell Y about X". rss: I can look up RSS headlines and insert them in the middle of a factoid. Use the <rss> tag: 'use Perl headlines is <rss="http://use.perl.org/useperl.rdf">'. download: You can download your own infobot from <http://www.infobot.org/>. action: You can make me reply with an action (/me) with the <action> tag. For example, if you tell me "jump is <action> jumps high", then I will do "/me jumps high" when you say "jump". seen: I keep track of who I see speaking on-channel, and who sends me private messages. To find out when someone was around last, ask me "seen nickname". dns: I can look up hostnames, do traceroutes, and check InterNIC's whois database. Use "dns foo.com", "traceroute foo.com", or "internic foo.com". spell: To have me look up the spelling of a word, tell me to spell it the way you think it is spelled. For example, "spell cammel". magic8ball: Ask me to divine the future ("divine Will I get a raise?") and I'll tell you what my Magic 8 Ball says. exchange: To have me look up exchange rates, tell me the currency symbols and the amount: "change 25.52 USD to GBP" will tell you that $25.52 US dollars is (some number of) British pounds. exchange: If you don't know the currency symbol, ask me "currency country-name". stockquote: To get a (delayed) stock price quotation, ask me "quote SYMBOL". purldoc: To search the table of contents of the Perl FAQ, ask me "purldoc KEYWORD". translate: I can translate between English and one of Spanish (es), German (de), French (fr), Italian (it), or Portuguese (pt). To translate from English to French, tell me "x to fr good morning!", and I will tell you "bon matin!". translate: To translate from German to English, tell me "x from de ich bin ein Berliner" and I will tell you "I am a jelly donut". ebay: To look up the status of an eBay auction, ask me "ebay auction-number". convert: To convert between two types of measurement, give me the types and the quantity: "convert 2 ml to gallons" will tell you that 2 ml makes 0.0005 gallons. convert: For more information on how to describe units to me (such as "cubic inches per foot-pound-second", see the manual page for units(1) on a Unix system. zippy: YOW! It's ZIPPY the PINHEAD! (If you have to ask, you wouldn't understand.) metar: For current aerodrome weather observations, ask me "metar ICAO-CODE". For information on decoding METAR observations, see <http://www.avweb.com/toc/metartaf.html>. Also see 'help weather'. taf: For a current terminal area forecast, ask me "taf ICAO-CODE". For information on decoding TAF forecasts, see <http://www.avweb.com/toc/metartaf.html>. great-circle: The 'great-circle' command takes two airport identifiers and returns the great circle distance and heading between them. For example, try "great-circle CYHU KJFK" to find out how far it is from Montreal St Hubert to New York JFK International. tsd: To solve time/speed/distance problems, substitute 'x' for the unknown value in 'tsd TIME SPEED DISTANCE'. For example, 'tsd 3 x 200' will solve for the speed in at which you can travel 200 mi in 3h. zulutime: zulutime returns the current Zulu (UTC) time in DDHHMM format. airport: To find the ICAO code for an airport, ask me "airport code for CITY". To find the airport for an ICAO code, ask me "airport name for ICAO-CODE". insult: For a random insult, ask me to insult someone or something: "insult FORTRAN". Also, try "insult COBOL in german". (See 'help translate' for languages.) excuse: You can ask me for a random excuse: "excuse for writing FORTRAN". weather: Ask me "weather ICAO-CODE" for a human-readable current weather observation. For ICAO codes, see 'help airport'. google: I can search Google; ask me "google for SEARCH TERMS". nickometer: For a subjective 0-to-100 rating of the lameness of a nickname, ask me "nickometer NICK". --- NEW FILE: infobot.users-dist --- # # User File (c) 1998 Infobot & Associates # # FLAGS # ---------------------- # i Ignored Flag # f MLF Usage Allowed # t Teaching Allowed # r Removing Allowed # m Modifying Allowed # c Part/Join Allowed # s Searching Allowed (possibly computationally expensive) # S user can make bot Say things # e Extra Privs [ not implemented robustly: AVOID ] # p oP on channel by public request # ---------------------- # o Owner Flag # ---------------------- # # recommended default user flags: +trmc UserEntry default { flags +trmcs; } # here's an example entry UserEntry oznoid { name "Tim Riker"; title "that new guy"; flags +ftrmcsSope; pass xxfxfIfoJHdYg; mask timriker!ti...@ri...; } UserEntry oznoid { name "Kevin A. Lenzo"; title "that guy"; flags +ftrmcsSope; pass rrmrxB6U4ryRk; mask *!lenzo@*.speech.cs.cmu.edu; } UserEntry plonk { name "Eep Malloy" title "that guy II"; flags +trmcspo; pass rrmrxB6U4ryRk; mask *!*@*.static.telerama.com } |
From: Tim R. <tim...@us...> - 2004-08-12 22:54:58
|
Update of /cvsroot/infobot/infobot/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24368/doc Modified Files: infobot_guide.html intro.bit Log Message: conf/*-dist files are now in conf/dist/ Index: infobot_guide.html =================================================================== RCS file: /cvsroot/infobot/infobot/doc/infobot_guide.html,v retrieving revision 1.5 retrieving revision 1.6 diff -w -u -r1.5 -r1.6 --- infobot_guide.html 2 Aug 2004 20:22:52 -0000 1.5 +++ infobot_guide.html 12 Aug 2004 22:54:46 -0000 1.6 @@ -327,7 +327,7 @@ <p> The 'p' (oP) flag in the userfile allows this to work. You'll need to set a hostmask. See - <code>files/infobot.users-dist</code> Also uses a + <code>conf/dist/infobot.users</code> Also uses a crypted password. <p> <dir> @@ -498,26 +498,26 @@ <LI> <b> editing the parameter file </b> <p> - The parameter file, usually in <code>files/infobot.config</code>, + The parameter file, usually in <code>conf/infobot.config</code>, is the most direct way to customize the settings on your infobot. <p> Before you run your infobot for the first time, you will need to - copy <code>files/infobot.config-dist</code> to - <code>files/infobot.config</code> and make changes to - <code>files/infobot.config</code> to configure your infobot. + copy <code>conf/dist/infobot.config</code> to + <code>conf/infobot.config</code> and make changes to + <code>conf/infobot.config</code> to configure your infobot. <p> <LI> <b>editing the user file</b> <p> - The user file, usually in <code>files/infobot.users</code>, + The user file, usually in <code>conf/infobot.users</code>, is the most direct way to customize the settings on your infobot. <p> Before you run your infobot for the first time, you will need to - copy <code>files/infobot.users-dist</code> to - <code>files/infobot.users</code>. You may wish to add yourself + copy <code>conf/dist/infobot.users</code> to + <code>conf/infobot.users</code>. You may wish to add yourself to the user list. <p> @@ -643,7 +643,7 @@ <p> You can set the infobot to automatically start up using <code>cron</code>. See the included example <code>crontab</code> - file, in <code>files/infobot.crontab</code> + file, in <code>conf/infobot.crontab</code> </UL> <hr> Index: intro.bit =================================================================== RCS file: /cvsroot/infobot/infobot/doc/intro.bit,v retrieving revision 1.3 retrieving revision 1.4 diff -w -u -r1.3 -r1.4 --- intro.bit 2 Aug 2004 20:22:52 -0000 1.3 +++ intro.bit 12 Aug 2004 22:54:46 -0000 1.4 @@ -251,7 +251,7 @@ <p> The 'p' (oP) flag in the userfile allows this to work. You'll need to set a hostmask. See - <code>files/infobot.users-dist</code> Also uses a + <code>files/dist/infobot.users</code> Also uses a crypted password. <p> <dir> |
From: Tim R. <tim...@us...> - 2004-08-12 22:54:58
|
Update of /cvsroot/infobot/infobot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24368 Modified Files: README README.quickstart REVISIONS Log Message: conf/*-dist files are now in conf/dist/ Index: README =================================================================== RCS file: /cvsroot/infobot/infobot/README,v retrieving revision 1.5 retrieving revision 1.6 diff -w -u -r1.5 -r1.6 --- README 2 Aug 2004 20:37:20 -0000 1.5 +++ README 12 Aug 2004 22:54:45 -0000 1.6 @@ -1,6 +1,6 @@ You will need to update your infobot.config and infobot.users. See the example files, -infobot.config-dist and infobot.users-dist. +conf/dist/infobot.config and conf/dist/infobot.users. -- Index: README.quickstart =================================================================== RCS file: /cvsroot/infobot/infobot/README.quickstart,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 --- README.quickstart 2 Aug 2004 20:22:51 -0000 1.2 +++ README.quickstart 12 Aug 2004 22:54:45 -0000 1.3 @@ -11,9 +11,9 @@ 2) Enter infobot/conf/ - a) Copy infobot.config-dist to infobot.config + a) Copy dist/infobot.config to infobot.config b) Open infobot.config in a text-editor and change as wanted - c) Copy infobot.users-dist to infobot.users + c) Copy dist/infobot.users to infobot.users d) Open infobot.users and change as wanted 3) Go back into infobot/ and execute the following commands, substituting BOTNAME Index: REVISIONS =================================================================== RCS file: /cvsroot/infobot/infobot/REVISIONS,v retrieving revision 1.27 retrieving revision 1.28 diff -w -u -r1.27 -r1.28 --- REVISIONS 2 Aug 2004 20:22:51 -0000 1.27 +++ REVISIONS 12 Aug 2004 22:54:45 -0000 1.28 @@ -1,5 +1,6 @@ XXX +conf/*-dist files are now in conf/dist/ Added more search configuration options Google Search fixed to use SOAP::Lite and a key (if you have a working WWW::Search Google) Added Gender and Name stats @@ -27,7 +28,7 @@ Logfile now shows up in same dir as databases, instead of in whatever directory infobot happened to be started from. Minor fixes to exchange.pl to account for Euro, decimalized currencies. -Config files distributed as -dist only, instead of two copies. +Config files distributed as conf/dist only, instead of two copies. Added extra in units.pl to do unit conversions like units(1). Unit definitions are in conf/unittab. Added extra in ebay.pl to look up eBay auction status. |
From: Tim R. <tim...@us...> - 2004-08-12 22:54:55
|
Update of /cvsroot/infobot/infobot/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24368/conf Modified Files: infobot.channels Removed Files: infobot.config-dist infobot.help-dist infobot.users-dist Log Message: conf/*-dist files are now in conf/dist/ Index: infobot.channels =================================================================== RCS file: /cvsroot/infobot/infobot/conf/infobot.channels,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 --- infobot.channels 2 Aug 2004 20:37:20 -0000 1.2 +++ infobot.channels 12 Aug 2004 22:54:45 -0000 1.3 @@ -1,6 +1,6 @@ # Channel File (c) 1999 Infobot & Associates -ChannelEntry #test { +ChannelEntry #botpark { fallback yes; addressing REQUIRE; shutup TRUE; --- infobot.config-dist DELETED --- --- infobot.help-dist DELETED --- --- infobot.users-dist DELETED --- |
From: Tim R. <tim...@us...> - 2004-08-12 22:46:54
|
Update of /cvsroot/infobot/infobot/conf/dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23287/dist Log Message: Directory /cvsroot/infobot/infobot/conf/dist added to the repository |
From: Tim R. <tim...@us...> - 2004-08-02 21:34:00
|
Update of /cvsroot/infobot/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8766 Modified Files: cvswrappers Log Message: image types Index: cvswrappers =================================================================== RCS file: /cvsroot/infobot/CVSROOT/cvswrappers,v retrieving revision 1.1 retrieving revision 1.2 diff -w -u -r1.1 -r1.2 --- cvswrappers 4 Feb 2000 20:12:05 -0000 1.1 +++ cvswrappers 2 Aug 2004 21:33:20 -0000 1.2 @@ -21,3 +21,40 @@ # and value is a single-quote delimited value. # For example: #*.gif -k 'b' +*.avi -k 'b' +*.AVI -k 'b' +*.doc -k 'b' +*.DOC -k 'b' +*.dot -k 'b' +*.DOT -k 'b' +*.gif -k 'b' +*.GIF -k 'b' +*.jpg -k 'b' +*.JPG -k 'b' +*.jpeg -k 'b' +*.JPEG -k 'b' +*.mp3 -k 'b' +*.MP3 -k 'b' +*.mpg -k 'b' +*.MPG -k 'b' +*.mpp -k 'b' +*.MPP -k 'b' +*.ogg -k 'b' +*.OGG -k 'b' +*.pdf -k 'b' +*.PDF -k 'b' +*.png -k 'b' +*.PNG -k 'b' +*.ppt -k 'b' +*.PPT -k 'b' +*.rgb -k 'b' +*.RGB -k 'b' +*.rpm -k 'b' +*.sdr -k 'b' +*.SDR -k 'b' +*.vsd -k 'b' +*.VSD -k 'b' +*.wav -k 'b' +*.WAV -k 'b' +*.xl* -k 'b' +*.XL* -k 'b' |
From: Tim R. <tim...@us...> - 2004-08-02 21:19:07
|
Update of /cvsroot/infobot/infobot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6089 Modified Files: TODO Log Message: TODO Index: TODO =================================================================== RCS file: /cvsroot/infobot/infobot/TODO,v retrieving revision 1.13 retrieving revision 1.14 diff -w -u -r1.13 -r1.14 --- TODO 2 Aug 2004 20:22:51 -0000 1.13 +++ TODO 2 Aug 2004 21:18:59 -0000 1.14 @@ -1,6 +1,23 @@ Infobot TODO list ----------------- +Tim Riker <Ti...@Ri...> woke up the project. Things he'd like +to see added to update infobot: + + - move from dbm to SQL backend. Include sqlite for local files + + - generic module forking code + + - multiple server/nick/channel support + + - local admin interface using readline + + - patchbot like features + + - CIA like features (email -> channel on cvs commits) + + - probably a tcp listener so for local admin interface + Wishlist: - Complete suite of offline database manipulation tools |
From: Tim R. <tim...@us...> - 2004-08-02 20:37:32
|
Update of /cvsroot/infobot/infobot/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29821/src Modified Files: Help.pl Irc.pl Process.pl Reply.pl Setup.pl Statement.pl User.pl Log Message: ws Index: Help.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Help.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -w -u -r1.5 -r1.6 --- Help.pl 2 Aug 2004 20:22:53 -0000 1.5 +++ Help.pl 2 Aug 2004 20:37:22 -0000 1.6 @@ -58,5 +58,4 @@ return ''; } - 1; Index: Irc.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Irc.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -w -u -r1.7 -r1.8 Index: Process.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Process.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -w -u -r1.8 -r1.9 --- Process.pl 5 Mar 2002 18:05:00 -0000 1.8 +++ Process.pl 2 Aug 2004 20:37:22 -0000 1.9 @@ -435,4 +435,3 @@ } 1; - Index: Reply.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Reply.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -w -u -r1.9 -r1.10 --- Reply.pl 2 Aug 2004 20:22:53 -0000 1.9 +++ Reply.pl 2 Aug 2004 20:37:22 -0000 1.10 @@ -374,4 +374,3 @@ } 1; - Index: Setup.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Setup.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -w -u -r1.10 -r1.11 --- Setup.pl 2 Aug 2004 20:22:53 -0000 1.10 +++ Setup.pl 2 Aug 2004 20:37:22 -0000 1.11 @@ -155,5 +155,4 @@ &loadParamFiles(@paramfiles); } - 1; Index: Statement.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/Statement.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -w -u -r1.6 -r1.7 Index: User.pl =================================================================== RCS file: /cvsroot/infobot/infobot/src/User.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -w -u -r1.10 -r1.11 --- User.pl 2 Aug 2004 20:22:53 -0000 1.10 +++ User.pl 2 Aug 2004 20:37:22 -0000 1.11 @@ -433,4 +433,3 @@ } 1; - |
From: Tim R. <tim...@us...> - 2004-08-02 20:37:31
|
Update of /cvsroot/infobot/infobot/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29821/scripts Modified Files: README.scripts make_password make_snap restore_snap run_if_needed.pl Log Message: ws Index: README.scripts =================================================================== RCS file: /cvsroot/infobot/infobot/scripts/README.scripts,v retrieving revision 1.4 retrieving revision 1.5 diff -w -u -r1.4 -r1.5 --- README.scripts 2 Aug 2004 20:22:52 -0000 1.4 +++ README.scripts 2 Aug 2004 20:37:22 -0000 1.5 @@ -33,4 +33,3 @@ directory, but this is for crontabbing the infobot. it will run it if it's not already running. this is not highly tested! YMMV. - Index: make_password =================================================================== RCS file: /cvsroot/infobot/infobot/scripts/make_password,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 --- make_password 2 Aug 2004 20:22:52 -0000 1.2 +++ make_password 2 Aug 2004 20:37:22 -0000 1.3 @@ -17,4 +17,3 @@ return crypt($what, $salt); } - Index: make_snap =================================================================== RCS file: /cvsroot/infobot/infobot/scripts/make_snap,v retrieving revision 1.3 retrieving revision 1.4 diff -w -u -r1.3 -r1.4 --- make_snap 2 Aug 2004 20:22:53 -0000 1.3 +++ make_snap 2 Aug 2004 20:37:22 -0000 1.4 @@ -28,4 +28,3 @@ close OUT; sleep 1; } - Index: restore_snap =================================================================== RCS file: /cvsroot/infobot/infobot/scripts/restore_snap,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 --- restore_snap 2 Aug 2004 20:22:53 -0000 1.2 +++ restore_snap 2 Aug 2004 20:37:22 -0000 1.3 @@ -42,4 +42,3 @@ close(IN); dbmclose(%db); } - Index: run_if_needed.pl =================================================================== RCS file: /cvsroot/infobot/infobot/scripts/run_if_needed.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -w -u -r1.1 -r1.2 --- run_if_needed.pl 9 Feb 2000 12:50:22 -0000 1.1 +++ run_if_needed.pl 2 Aug 2004 20:37:22 -0000 1.2 @@ -17,4 +17,3 @@ print "already running: \n"; print " @result\n"; } - |
From: Tim R. <tim...@us...> - 2004-08-02 20:37:31
|
Update of /cvsroot/infobot/infobot/extras In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29821/extras Modified Files: Extras.pl Speller.pl ebay.pl gender.pl imdb.pl myRoutines.pl Log Message: ws Index: Extras.pl =================================================================== RCS file: /cvsroot/infobot/infobot/extras/Extras.pl,v retrieving revision 1.27 retrieving revision 1.28 diff -w -u -r1.27 -r1.28 --- Extras.pl 2 Aug 2004 20:22:52 -0000 1.27 +++ Extras.pl 2 Aug 2004 20:37:20 -0000 1.28 @@ -954,4 +954,3 @@ 1; - Index: Speller.pl =================================================================== RCS file: /cvsroot/infobot/infobot/extras/Speller.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 --- Speller.pl 6 Apr 2001 17:58:08 -0000 1.2 +++ Speller.pl 2 Aug 2004 20:37:21 -0000 1.3 @@ -42,6 +42,4 @@ return ''; } - 1; - Index: ebay.pl =================================================================== RCS file: /cvsroot/infobot/infobot/extras/ebay.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -w -u -r1.4 -r1.5 --- ebay.pl 18 Jun 2001 00:15:06 -0000 1.4 +++ ebay.pl 2 Aug 2004 20:37:21 -0000 1.5 @@ -173,5 +173,3 @@ =head1 AUTHOR Dave Brown <dag...@cs...> - - Index: gender.pl =================================================================== RCS file: /cvsroot/infobot/infobot/extras/gender.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 --- gender.pl 2 Aug 2004 20:22:52 -0000 1.2 +++ gender.pl 2 Aug 2004 20:37:21 -0000 1.3 @@ -122,5 +122,4 @@ } } - 1; Index: imdb.pl =================================================================== RCS file: /cvsroot/infobot/infobot/extras/imdb.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -w -u -r1.4 -r1.5 --- imdb.pl 2 Aug 2004 20:22:52 -0000 1.4 +++ imdb.pl 2 Aug 2004 20:37:21 -0000 1.5 @@ -385,4 +385,5 @@ } return \%data_hash; } + 1; Index: myRoutines.pl =================================================================== RCS file: /cvsroot/infobot/infobot/extras/myRoutines.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 --- myRoutines.pl 24 Jan 2002 19:39:13 -0000 1.2 +++ myRoutines.pl 2 Aug 2004 20:37:21 -0000 1.3 @@ -60,4 +60,3 @@ } 1; - |
From: Tim R. <tim...@us...> - 2004-08-02 20:37:29
|
Update of /cvsroot/infobot/infobot/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29821/conf Modified Files: infobot.channels infobot.crontab infobot.help-dist Log Message: ws Index: infobot.channels =================================================================== RCS file: /cvsroot/infobot/infobot/conf/infobot.channels,v retrieving revision 1.1 retrieving revision 1.2 diff -w -u -r1.1 -r1.2 --- infobot.channels 9 Dec 2000 22:57:27 -0000 1.1 +++ infobot.channels 2 Aug 2004 20:37:20 -0000 1.2 @@ -7,4 +7,3 @@ msgonly TRUE; continuity 0; } - Index: infobot.crontab =================================================================== RCS file: /cvsroot/infobot/infobot/conf/infobot.crontab,v retrieving revision 1.1 retrieving revision 1.2 diff -w -u -r1.1 -r1.2 --- infobot.crontab 9 Dec 2000 22:57:27 -0000 1.1 +++ infobot.crontab 2 Aug 2004 20:37:20 -0000 1.2 @@ -1,2 +1 @@ */5 * * * * /usr/users/you/infobot0.1b/run_infobots.pl > /dev/null - Index: infobot.help-dist =================================================================== RCS file: /cvsroot/infobot/infobot/conf/infobot.help-dist,v retrieving revision 1.3 retrieving revision 1.4 diff -w -u -r1.3 -r1.4 --- infobot.help-dist 2 Aug 2004 20:22:51 -0000 1.3 +++ infobot.help-dist 2 Aug 2004 20:37:20 -0000 1.4 @@ -71,5 +71,3 @@ google: I can search Google; ask me "google for SEARCH TERMS". nickometer: For a subjective 0-to-100 rating of the lameness of a nickname, ask me "nickometer NICK". - - |
From: Tim R. <tim...@us...> - 2004-08-02 20:37:29
|
Update of /cvsroot/infobot/infobot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29821 Modified Files: README README.modules infobot Log Message: ws Index: README =================================================================== RCS file: /cvsroot/infobot/infobot/README,v retrieving revision 1.4 retrieving revision 1.5 diff -w -u -r1.4 -r1.5 --- README 2 Aug 2004 20:22:51 -0000 1.4 +++ README 2 Aug 2004 20:37:20 -0000 1.5 @@ -1,4 +1,3 @@ - You will need to update your infobot.config and infobot.users. See the example files, infobot.config-dist and infobot.users-dist. @@ -143,5 +142,3 @@ tris for being an early guinea pig jadin for pointing out the @verb bug... fixed in 0.17b chucky burnett for tons of stuff - - Index: README.modules =================================================================== RCS file: /cvsroot/infobot/infobot/README.modules,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 --- README.modules 2 Aug 2004 20:22:51 -0000 1.2 +++ README.modules 2 Aug 2004 20:37:20 -0000 1.3 @@ -53,5 +53,3 @@ XML::Parser (required by XML::RSS; requires the non-Perl, open-source 'expat' XML library) XML::RSS - - Index: infobot =================================================================== RCS file: /cvsroot/infobot/infobot/infobot,v retrieving revision 1.14 retrieving revision 1.15 diff -w -u -r1.14 -r1.15 --- infobot 2 Aug 2004 20:22:51 -0000 1.14 +++ infobot 2 Aug 2004 20:37:20 -0000 1.15 @@ -149,5 +149,3 @@ } 1; - - |
From: Tim R. <tim...@us...> - 2004-08-02 20:26:32
|
Update of /cvsroot/infobot/infobot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27436 Modified Files: LICENSE Log Message: copyright Index: LICENSE =================================================================== RCS file: /cvsroot/infobot/infobot/LICENSE,v retrieving revision 1.4 retrieving revision 1.5 diff -w -u -r1.4 -r1.5 --- LICENSE 2 Aug 2004 20:22:51 -0000 1.4 +++ LICENSE 2 Aug 2004 20:26:23 -0000 1.5 @@ -1,4 +1,4 @@ -Copyright (c) Kevin Lenzo, 1996-2002, except where noted +Copyright (c) Kevin Lenzo, 1996-2004, except where noted otherwise. The Infobot is covered under the same terms as Perl itself |
From: Tim R. <tim...@us...> - 2004-08-02 20:23:31
|
Update of /cvsroot/infobot/infobot/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26554/conf Modified Files: infobot.config-dist infobot.help-dist unittab.txt Log Message: ws Index: infobot.config-dist =================================================================== RCS file: /cvsroot/infobot/infobot/conf/infobot.config-dist,v retrieving revision 1.18 retrieving revision 1.19 diff -w -u -r1.18 -r1.19 Index: infobot.help-dist =================================================================== RCS file: /cvsroot/infobot/infobot/conf/infobot.help-dist,v retrieving revision 1.2 retrieving revision 1.3 diff -w -u -r1.2 -r1.3 Index: unittab.txt =================================================================== RCS file: /cvsroot/infobot/infobot/conf/unittab.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -w -u -r1.1 -r1.2 |