simbot-commits Mailing List for SimBot
Status: Abandoned
Brought to you by:
kstange
This list is closed, nobody may subscribe to it.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(88) |
Jun
(11) |
Jul
(64) |
Aug
(74) |
Sep
(1) |
Oct
(4) |
Nov
(12) |
Dec
(4) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
(1) |
Nov
(4) |
Dec
|
| 2007 |
Jan
(5) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Kevin S. <ks...@us...> - 2008-05-24 09:02:27
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12723 Modified Files: google.pl Log Message: Remind me to rewrite this sooner, rather than later. This is getting rediculous. Index: google.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/google.pl,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -p -r1.22 -r1.23 --- google.pl 29 Apr 2008 06:21:07 -0000 1.22 +++ google.pl 24 May 2008 09:02:22 -0000 1.23 @@ -59,7 +59,7 @@ sub google_find { } elsif (!$response->is_error) { # Let's use the calculator! if ($response->content =~ m|/images/calc_img\.gif|) { - $response->content =~ m|<td nowrap><h2 class=r><font size=\+1><b>(.*?)</b></h2></td>|; + $response->content =~ m|<font size=\+1><b>(.*?)</b>|; # We can't just take $1 because it might have HTML in it my $result = $1; $result =~ s|<sup>(.*?)</sup>|^$1|g; |
|
From: Kevin S. <ks...@us...> - 2008-04-29 06:21:11
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8723 Modified Files: google.pl Log Message: Google changed the calculator HTML a bit. This is a reminder why this is the wrong way to get this information out of google. Maybe someday I'll get around to actually coding again... :) Index: google.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/google.pl,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -p -r1.21 -r1.22 --- google.pl 10 Nov 2005 13:02:15 -0000 1.21 +++ google.pl 29 Apr 2008 06:21:07 -0000 1.22 @@ -59,7 +59,7 @@ sub google_find { } elsif (!$response->is_error) { # Let's use the calculator! if ($response->content =~ m|/images/calc_img\.gif|) { - $response->content =~ m|<td nowrap><font size=\+1><b>(.*?)</b></td>|; + $response->content =~ m|<td nowrap><h2 class=r><font size=\+1><b>(.*?)</b></h2></td>|; # We can't just take $1 because it might have HTML in it my $result = $1; $result =~ s|<sup>(.*?)</sup>|^$1|g; |
|
From: Kevin S. <ks...@us...> - 2007-05-16 09:09:11
|
Update of /cvsroot/simbot/simbot/tools In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8534/tools Modified Files: create_wx_station_db.pl Log Message: Looks like NOAA moved their FTP server... Index: create_wx_station_db.pl =================================================================== RCS file: /cvsroot/simbot/simbot/tools/create_wx_station_db.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -p -r1.8 -r1.9 --- create_wx_station_db.pl 26 Feb 2007 02:43:00 -0000 1.8 +++ create_wx_station_db.pl 16 May 2007 09:09:03 -0000 1.9 @@ -121,7 +121,7 @@ if($response->is_error) { # METAR reports. Let's find codes to remove... print "Downloading METAR directory listing (this may take a while)... "; -$response = $ua->get('ftp://weather.noaa.gov/data/observations/metar/stations/'); +$response = $ua->get('ftp://tgftp.nws.noaa.gov/data/observations/metar/stations/'); if($response->is_error) { print STDERR "Failed! " . $response->code . ' ' . $response->message . "\n"; |
|
From: Pete P. <fou...@us...> - 2007-04-05 02:45:41
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16934/plugins Modified Files: weather.pl Log Message: Remember that bug I fixed last time? This time for sure! (-RAPL should parse properly) Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -p -r1.115 -r1.116 --- weather.pl 17 Mar 2007 02:09:03 -0000 1.115 +++ weather.pl 5 Apr 2007 02:45:33 -0000 1.116 @@ -1028,15 +1028,18 @@ sub parse_metar { } elsif($cur_block =~ m{^ # WX COND (-|\+|VC)? # Intensity - (MI|PR|BC|DR|BL|SH|TS|FR)? # Descriptor - (DZ|RA|SN|SG|IC|PL|GR|GS|UP)* # Precipitation - (BR|FG|FU|VA|DU|SA|HZ|PY)? # Obscuration - (PO|SQ|FC|SS)? # Other - $}x) { - my ($intensity, $descriptor, $precip, $obscuration, $other) - = ($1,$2,$3,$4,$5); - my @cond; + ((?:MI|PR|BC|DR|BL|SH|TS|FR)? # Descriptor + (?:DZ|RA|SN|SG|IC|PL|GR|GS|UP)* # Precipitation + (?:BR|FG|FU|VA|DU|SA|HZ|PY)? # Obscuration + (?:PO|SQ|FC|SS)? # Other + )$}x) { + my $intensity = $1; + my $other_blocks = $2; + #my ($intensity, $descriptor, $precip, $obscuration, $other) + # = ($1,$2,$3,$4,$5); + my @cond; + my $shower = 0; if(defined $intensity) { if($intensity =~ m/^-$/) { push(@cond, 'light'); @@ -1045,23 +1048,33 @@ sub parse_metar { } } - if(defined $descriptor && $descriptor !~ m/^SH$/) { - push(@cond, $cond_names{$descriptor}); - } + while($other_blocks =~ m/([A-Z]{2})/g) { + if($1 eq 'SH') { + $shower = 1; + } else { + push(@cond, $cond_names{$1}); + } + } + + if($shower) { push(@cond, $cond_names{'SH'}); } + + #if(defined $descriptor && $descriptor !~ m/^SH$/) { + # push(@cond, $cond_names{$descriptor}); + #} - if(defined $precip) { - push(@cond, $cond_names{$precip}); - } - if(defined $obscuration) { - push(@cond, $cond_names{$obscuration}); - } - if(defined $other) { - push(@cond, $cond_names{$other}); - } + #if(defined $precip) { + # push(@cond, $cond_names{$precip}); + #} + #if(defined $obscuration) { + # push(@cond, $cond_names{$obscuration}); + #} + #if(defined $other) { + # push(@cond, $cond_names{$other}); + #} - if(defined $descriptor && $descriptor =~ m/^SH$/) { - push(@cond, $cond_names{'SH'}); - } + #if(defined $descriptor && $descriptor =~ m/^SH$/) { + # push(@cond, $cond_names{'SH'}); + #} push(@sky_conds, join(' ', @cond)); |
|
From: Pete P. <fou...@us...> - 2007-03-19 02:49:00
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30781/plugins Modified Files: weather.pl Log Message: "-SNPL" is now parsed properly. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -p -r1.114 -r1.115 --- weather.pl 26 Feb 2007 02:42:57 -0000 1.114 +++ weather.pl 17 Mar 2007 02:09:03 -0000 1.115 @@ -1029,7 +1029,7 @@ sub parse_metar { } elsif($cur_block =~ m{^ # WX COND (-|\+|VC)? # Intensity (MI|PR|BC|DR|BL|SH|TS|FR)? # Descriptor - (DZ|RA|SN|SG|IC|PL|GR|GS|UP)? # Precipitation + (DZ|RA|SN|SG|IC|PL|GR|GS|UP)* # Precipitation (BR|FG|FU|VA|DU|SA|HZ|PY)? # Obscuration (PO|SQ|FC|SS)? # Other $}x) { |
|
From: Pete P. <fou...@us...> - 2007-02-26 02:43:32
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5108 Modified Files: ChangeLog Log Message: URLs to custom stations generating METAR reports can now be added to the stations database. Index: ChangeLog =================================================================== RCS file: /cvsroot/simbot/simbot/ChangeLog,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -p -r1.83 -r1.84 --- ChangeLog 22 Jan 2007 03:41:49 -0000 1.83 +++ ChangeLog 26 Feb 2007 02:42:55 -0000 1.84 @@ -1,3 +1,10 @@ +Version 1.0 alpha: (25 Feb 2007) + * plugins/weather.pl + - Added a column 'url' to the stations database. A custom station + can be added to the database. url must be the URL to a METAR + format report. Custom station IDs currently must be in the format + Kxxxxxxxn where x is a letter and n a number. + Version 1.0 alpha: (21 Jan 2007) * plugins/dice.pl: - Change by KewlioMZX: When rolling dice, give the total. |
|
From: Pete P. <fou...@us...> - 2007-02-26 02:43:10
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5108/plugins Modified Files: weather.pl Log Message: URLs to custom stations generating METAR reports can now be added to the stations database. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.113 retrieving revision 1.114 diff -u -d -p -r1.113 -r1.114 --- weather.pl 16 Jan 2007 22:00:45 -0000 1.113 +++ weather.pl 26 Feb 2007 02:42:57 -0000 1.114 @@ -81,7 +81,7 @@ use constant PI => 3.1415926; # Flags use constant USING_DEFAULTS => 512; use constant RAW_METAR => 256; -# => 128; +use constant CUSTOM_STATION => 128; use constant UNITS_METRIC => 64; use constant UNITS_IMPERIAL => 32; use constant UNITS_AUTO => 16; @@ -166,7 +166,8 @@ CREATE TABLE stations ( state STRING, country STRING, latitude REAL, - longitude REAL + longitude REAL, + url STRING ); CREATE UNIQUE INDEX stationid @@ -223,12 +224,12 @@ sub do_wx { return; } - my($station, $postalcode, $lat, $long, $state, $geocode); + my($station, $postalcode, $lat, $long, $state, $geocode, $url); if ($location =~ /^\d{5}$/) { $postalcode = $location; } # US elsif($location =~ /^([A-Z]{1,2}[0-9]{1,2}[A-Z]?)(?: [0-9][A-Z]{2})?$/) { $postalcode = $1; } # UK - elsif($location =~ /^[A-Z0-9]{4}$/i) { $station = $location; } + elsif($location =~ /^[A-Z0-9]{4,9}$/i) { $station = $location; } # OK, now we know what location specification the user gave us. @@ -236,11 +237,11 @@ sub do_wx { if(defined $station) { # try to get lat/long/state from the station my $query = $dbh->prepare_cached( - 'SELECT latitude, longitude, state FROM stations' + 'SELECT latitude, longitude, state, url FROM stations' . ' WHERE id = ? LIMIT 1' ); $query->execute($station); - ($lat, $long, $state) = $query->fetchrow_array; + ($lat, $long, $state, $url) = $query->fetchrow_array; $query->finish; # FIXME: OK, now try to get the geocode from the lat/long @@ -277,7 +278,7 @@ sub do_wx { } if($flags & DO_CONDITIONS) { - if(!defined $station || length($station) != 4) { + if(!defined $station || (length($station) != 4 && length($station) != 9)) { # Whine and bail &SimBot::send_message(&option('network', 'channel'), "$nick: " @@ -288,21 +289,28 @@ sub do_wx { } $station = uc($station); - #my $url = - # 'http://weather.noaa.gov/pub/data/observations/metar/stations/' - # . $station . '.TXT'; - #my $request = HTTP::Request->new(GET=>$url); - $kernel->post('wxua' => 'request', 'got_metar', - (POST 'http://adds.aviationweather.noaa.gov/metars/index.php', - Content_Type => 'form-data', - Content => [ - station_ids => $station, - std_trans => 'standard', - chk_metars => 'on', - hoursStr => 'most recent only', - submitmet => 'Submit', - ], - ), "$nick!$station!$flags"); + + if($url) { + # custom station + $kernel->post('wxua' => 'request', 'got_metar', + (GET $url), "$nick!$station!$flags"); + } else { + #my $url = + # 'http://weather.noaa.gov/pub/data/observations/metar/stations/' + # . $station . '.TXT'; + #my $request = HTTP::Request->new(GET=>$url); + $kernel->post('wxua' => 'request', 'got_metar', + (POST 'http://adds.aviationweather.noaa.gov/metars/index.php', + Content_Type => 'form-data', + Content => [ + station_ids => $station, + std_trans => 'standard', + chk_metars => 'on', + hoursStr => 'most recent only', + submitmet => 'Submit', + ], + ), "$nick!$station!$flags"); + } } if($flags & DO_FORECAST && defined $lat) { @@ -340,9 +348,10 @@ sub got_metar { return; } unless(($raw_metar) = $response->content =~ m|<FONT FACE="Monospace,Courier">(.*?)</FONT>|s) { - &debug(1, "NOAA made no sense. They said:\n" . $response->content . "\n"); - &SimBot::send_message(&option('network', 'channel'), "$nick: I couldn't make sense of what NOAA told me."); - return; +# &debug(1, "NOAA made no sense. They said:\n" . $response->content . "\n"); +# &SimBot::send_message(&option('network', 'channel'), "$nick: I couldn't make sense of what NOAA told me."); +# return; + $raw_metar = $response->content; } $raw_metar =~ s/\s+/ /ig; @@ -930,7 +939,7 @@ sub parse_metar { $weather_data{'report_type'} = $1; - } elsif($cur_block =~ m/^([A-Z]{4})$/ + } elsif($cur_block =~ m/^([A-Z]{4}|K[A-Z]{7}\d)$/ && !defined $weather_data{'station_id'}) { # ID # Station ID $weather_data{'station_id'} = $1; |
|
From: Pete P. <fou...@us...> - 2007-02-26 02:43:09
|
Update of /cvsroot/simbot/simbot/tools In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5108/tools Modified Files: create_wx_station_db.pl Log Message: URLs to custom stations generating METAR reports can now be added to the stations database. Index: create_wx_station_db.pl =================================================================== RCS file: /cvsroot/simbot/simbot/tools/create_wx_station_db.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -p -r1.7 -r1.8 --- create_wx_station_db.pl 14 Jul 2005 00:08:35 -0000 1.7 +++ create_wx_station_db.pl 26 Feb 2007 02:43:00 -0000 1.8 @@ -53,7 +53,8 @@ CREATE TABLE stations ( state STRING, country STRING, latitude REAL, - longitude REAL + longitude REAL, + url STRING ); EOT |
|
From: Pete P. <fou...@us...> - 2007-01-22 03:41:55
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16146 Modified Files: ChangeLog Log Message: This is the first change to the changelog since 10 Nov 2005. Added a feature by KewlioMZX to give the sum of rolled dice. Index: ChangeLog =================================================================== RCS file: /cvsroot/simbot/simbot/ChangeLog,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -p -r1.82 -r1.83 --- ChangeLog 10 Nov 2005 13:02:12 -0000 1.82 +++ ChangeLog 22 Jan 2007 03:41:49 -0000 1.83 @@ -1,3 +1,7 @@ +Version 1.0 alpha: (21 Jan 2007) + * plugins/dice.pl: + - Change by KewlioMZX: When rolling dice, give the total. + Version 1.0 alpha: (10 Nov 2005) * lib/SimBot/Util.pm: - Moved several functions into SimBot::Util, which can be used by |
|
From: Pete P. <fou...@us...> - 2007-01-22 03:41:54
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16146/plugins Modified Files: dice.pl Log Message: This is the first change to the changelog since 10 Nov 2005. Added a feature by KewlioMZX to give the sum of rolled dice. Index: dice.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/dice.pl,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -p -r1.26 -r1.27 --- dice.pl 23 Nov 2006 08:52:11 -0000 1.26 +++ dice.pl 22 Jan 2007 03:41:50 -0000 1.27 @@ -8,7 +8,7 @@ # coin with '%flip' and play "rock, paper, scissors, with '%rps.' # # COPYRIGHT: -# Copyright (C) 2003-05, Pete Pearson +# Copyright (C) 2003-07, Pete Pearson # # This program is free software; you can redistribute and/or modify it # under the terms of version 2 of the GNU General Public License as @@ -58,6 +58,7 @@ use constant RPS_CHEER => ( sub roll_dice { my $numDice = 2; my $numSides = 6; + my $diceTotal = 0; my ($kernel, $nick, $channel, undef, $dice) = @_; if($dice =~ m/(\d*)[Dd](\d+)/) { $numDice = (defined $1 ? $1 : 1); @@ -76,10 +77,12 @@ sub roll_dice { } else { my @rolls = (); for(my $x=0;$x<$numDice;$x++) { - push(@rolls, int rand($numSides)+1); + my $diceRoll = int rand($numSides)+1; + $diceTotal += $diceRoll; + push(@rolls, $diceRoll); } - &SimBot::send_action($channel, "rolls $numDice ${numSides}-sided " . (($numDice==1) ? 'die' : 'dice') . " for ${nick}: " . join(' ', @rolls)); + &SimBot::send_action($channel, "rolls $numDice ${numSides}-sided " . (($numDice==1) ? 'die' : 'dice') . " for ${nick}: " . join(' ', @rolls) . ($numDice==1 ? '' : " -- total of $diceTotal")); } } |
|
From: Pete P. <fou...@us...> - 2007-01-16 22:00:48
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17176/plugins Modified Files: weather.pl Log Message: Now with more \n! Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -p -r1.112 -r1.113 --- weather.pl 16 Jan 2007 21:58:14 -0000 1.112 +++ weather.pl 16 Jan 2007 22:00:45 -0000 1.113 @@ -401,7 +401,7 @@ sub got_metar { my $reply = 'As reported '; if(defined $wxhash->{'report_time'}->{'unixtime'}) { if($wxhash->{'report_time'}->{'unixtime'} > time) { - &debug(1, "weather: METAR is in the future, check your clock!"); + &debug(1, "weather: METAR is in the future, check your clock!\n"); $reply .= sprintf('at %d:%02d', $wxhash->{'report_time'}->{'hour'}, $wxhash->{'report_time'}->{'minute'}) |
|
From: Pete P. <fou...@us...> - 2007-01-16 21:58:21
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15485/plugins Modified Files: weather.pl Log Message: Weather reports from the future will trigger a "check your clock" warning and will no longer be reported as being very recent. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -p -r1.111 -r1.112 --- weather.pl 17 Aug 2006 22:02:57 -0000 1.111 +++ weather.pl 16 Jan 2007 21:58:14 -0000 1.112 @@ -400,7 +400,15 @@ sub got_metar { my $reply = 'As reported '; if(defined $wxhash->{'report_time'}->{'unixtime'}) { - $reply .= &timeago($wxhash->{'report_time'}->{'unixtime'}, 1); + if($wxhash->{'report_time'}->{'unixtime'} > time) { + &debug(1, "weather: METAR is in the future, check your clock!"); + $reply .= sprintf('at %d:%02d', + $wxhash->{'report_time'}->{'hour'}, + $wxhash->{'report_time'}->{'minute'}) + . ' ' . $wxhash->{'report_time'}->{'timezone'}; + } else { + $reply .= &timeago($wxhash->{'report_time'}->{'unixtime'}, 1); + } } else { $reply .= sprintf('at %d:%02d', $wxhash->{'report_time'}->{'hour'}, |
|
From: Pete P. <fou...@us...> - 2007-01-15 02:28:05
|
Update of /cvsroot/simbot/simbot/lib/SimBot In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21454/lib/SimBot Modified Files: Util.pm Log Message: Replace EM DASH with -- and EN DASH with -. Index: Util.pm =================================================================== RCS file: /cvsroot/simbot/simbot/lib/SimBot/Util.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- Util.pm 5 Nov 2006 03:31:31 -0000 1.5 +++ Util.pm 15 Jan 2007 02:28:00 -0000 1.6 @@ -549,6 +549,8 @@ sub timeago { sub char_sub { my $text = $_[0]; + $text =~ s/\N{EM DASH}/--/g; + $text =~ s/(\N{EN DASH}|\N{FIGURE DASH})/-/g; # if only I could do \N{*DASH} $text =~ s/\N{HORIZONTAL ELLIPSIS}/.../g; $text =~ s/\N{TWO DOT LEADER}/../g; $text =~ s/\N{ONE DOT LEADER}/./g; |
|
From: Kevin S. <ks...@us...> - 2006-11-23 08:52:15
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31093/plugins Modified Files: dice.pl Log Message: I find it sad that I can't remember how to update my own code. This means I am not working on it frequently enough. Index: dice.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/dice.pl,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -p -r1.25 -r1.26 --- dice.pl 23 Nov 2006 08:42:55 -0000 1.25 +++ dice.pl 23 Nov 2006 08:52:11 -0000 1.26 @@ -156,7 +156,7 @@ sub nlp_match { "the", "1", "many", "12", "dozen", "12", - "dozens", "48", + "dozens of", "48", "several", "7", "lot of", "30", "lots of", "30", |
|
From: Kevin S. <ks...@us...> - 2006-11-23 08:48:19
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29828/plugins Modified Files: nlp.pl Log Message: I forgot this. Index: nlp.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/nlp.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -p -r1.8 -r1.9 --- nlp.pl 10 Nov 2005 13:02:15 -0000 1.8 +++ nlp.pl 23 Nov 2006 08:48:16 -0000 1.9 @@ -258,7 +258,7 @@ sub process_nlp { # a decimal number $format =~ s/\{d\}/\\d+\\.?\\d*/g; # a quantity (a number, a decimal number, or some named values) - $format =~ s/\{q\}/(\\d+\\.?\\d*|couple|couple of|handful of|all|every|all the|no|some|few|an|the|many|several|plenty of|lot of|lots of|copious|excessive|$verbmatch)/g; + $format =~ s/\{q\}/(\\d+\\.?\\d*|couple|couple of|handful of|all|every|all the|no|some|few|an|the|many|several|plenty of|lot of|lots of|copious|excessive|dozen|dozens of|$verbmatch)/g; # x wordlike characters (a single word of length x) $format =~ s/\{w(\d+)\}/\\w{$1}/g; # one or more word-like characters ( a single word) |
|
From: Kevin S. <ks...@us...> - 2006-11-23 08:42:59
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27254/plugins Modified Files: dice.pl Log Message: Dozens can be valid numbers, though this isn't as robust as it could be. Index: dice.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/dice.pl,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -p -r1.24 -r1.25 --- dice.pl 10 Nov 2005 13:02:15 -0000 1.24 +++ dice.pl 23 Nov 2006 08:42:55 -0000 1.25 @@ -155,6 +155,8 @@ sub nlp_match { "an", "1", "the", "1", "many", "12", + "dozen", "12", + "dozens", "48", "several", "7", "lot of", "30", "lots of", "30", @@ -218,7 +220,7 @@ sub nlp_match { event_plugin_nlp_call => \&nlp_match, hash_plugin_nlp_verbs => - ["roll"], + ["roll", "throw"], hash_plugin_nlp_subjects => ["dice", "die"], hash_plugin_nlp_formats => |
|
From: Kevin S. <ks...@us...> - 2006-11-05 03:31:51
|
Update of /cvsroot/simbot/simbot/lib/SimBot In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1610 Modified Files: Util.pm Log Message: Exporting the same function twice does not increase effectiveness. :) Index: Util.pm =================================================================== RCS file: /cvsroot/simbot/simbot/lib/SimBot/Util.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- Util.pm 10 Nov 2005 13:40:05 -0000 1.4 +++ Util.pm 5 Nov 2006 03:31:31 -0000 1.5 @@ -30,7 +30,7 @@ use Exporter 'import'; VERSION PROJECT HOME_PAGE DEBUG_NO_PREFIX DEBUG_NONE DEBUG_ERR DEBUG_WARN DEBUG_STD DEBUG_INFO DEBUG_SPAM debug load_config pick option option_list options_in_section - pick get_args parse_style htmlize html_mask_email numberize + get_args parse_style htmlize html_mask_email numberize timeago char_sub ); |
|
From: Kevin S. <ks...@us...> - 2006-10-16 04:47:56
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12250/plugins Modified Files: time.pl Log Message: Fix the description header of the time plugin. :) Index: time.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/time.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- time.pl 10 Nov 2005 13:02:15 -0000 1.2 +++ time.pl 16 Oct 2006 04:47:46 -0000 1.3 @@ -2,9 +2,10 @@ # SimBot Time Conversion Plugin # # DESCRIPTION: -# The TinyURL plugin watches chat for URLs pointing to TinyURL -# style services. When one is recognized, it looks up the URL, and -# announces in chat where the URL points. +# The Time plugin does not watch chat for URLs pointing to TinyURL +# style services. Instead, it watches for its command and a list +# of POSIX-style time zones and shows current local time, as well +# as the current time for each of those zones (Or UTC otherwise). # # COPYRIGHT: # Copyright (C) 2005, Pete Pearson |
|
From: Pete P. <fou...@us...> - 2006-09-23 16:50:57
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12993 Modified Files: INSTALL Log Message: Bugs and bugs, but what do I fix? The friggin INSTALL file. Oh, well. (Added SOAP::Lite) Index: INSTALL =================================================================== RCS file: /cvsroot/simbot/simbot/INSTALL,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -p -r1.28 -r1.29 --- INSTALL 17 Jan 2006 11:17:19 -0000 1.28 +++ INSTALL 23 Sep 2006 16:50:49 -0000 1.29 @@ -65,6 +65,10 @@ intend to use any of the stock plugins p * Required by: httpd +[ SOAP::Lite ] + + * Required by: weather + All of these modules are available in the CPAN repository, so you can install them in most Perl environments by running: |
|
From: Kevin S. <ks...@us...> - 2006-09-18 08:19:54
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9766 Modified Files: sqlite-logger.pl Log Message: Also, this plugin is sqlite, not seen. :) Index: sqlite-logger.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/sqlite-logger.pl,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -p -r1.75 -r1.76 --- sqlite-logger.pl 18 Sep 2006 08:15:45 -0000 1.75 +++ sqlite-logger.pl 18 Sep 2006 08:19:51 -0000 1.76 @@ -286,7 +286,7 @@ sub do_seen { if ( $context =~ m/seen-row=(\d+)/ ) { $seen_row = $1; } else { - &debug(DEBUG_WARN, 'seen: This shouldn\'t happen!\n'); + &debug(DEBUG_WARN, 'sqlite: This shouldn\'t happen!\n'); } if ( $context =~ m/seen-event=(\S+)/ ) { @events = split( /,/, $1 ); |
|
From: Kevin S. <ks...@us...> - 2006-09-18 08:15:51
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8230 Modified Files: sqlite-logger.pl Log Message: Do not die inside a plugin. Still yell, though. :) Index: sqlite-logger.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/sqlite-logger.pl,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -p -r1.74 -r1.75 --- sqlite-logger.pl 5 Feb 2006 03:26:30 -0000 1.74 +++ sqlite-logger.pl 18 Sep 2006 08:15:45 -0000 1.75 @@ -286,7 +286,7 @@ sub do_seen { if ( $context =~ m/seen-row=(\d+)/ ) { $seen_row = $1; } else { - die 'This shouldn\'t happen!'; + &debug(DEBUG_WARN, 'seen: This shouldn\'t happen!\n'); } if ( $context =~ m/seen-event=(\S+)/ ) { @events = split( /,/, $1 ); |
|
From: Pete P. <fou...@us...> - 2006-08-17 22:03:03
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29162/plugins Modified Files: weather.pl Log Message: Compass directions shouldn't be capitalized in this context. I think. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -p -r1.110 -r1.111 --- weather.pl 20 Mar 2006 12:48:17 -0000 1.110 +++ weather.pl 17 Aug 2006 22:02:57 -0000 1.111 @@ -1315,39 +1315,39 @@ sub deg_to_compass { return $deg; } if($deg < 11.25) { - return 'North'; + return 'north'; } elsif($deg < 33.75) { return 'NNE'; } elsif($deg < 56.25) { - return 'Northeast'; + return 'northeast'; } elsif($deg < 78.75) { return 'ENE'; } elsif($deg < 101.25) { - return 'East'; + return 'east'; } elsif($deg < 123.75) { return 'ESE'; } elsif($deg < 146.25) { - return 'Southeast'; + return 'southeast'; } elsif($deg < 168.75) { return 'SSE'; } elsif($deg < 191.25) { - return 'South'; + return 'south'; } elsif($deg < 213.75) { return 'SSW'; } elsif($deg < 236.25) { - return 'Southwest'; + return 'southwest'; } elsif($deg < 258.75) { return 'WSW'; } elsif($deg < 281.25) { - return 'West'; + return 'west'; } elsif($deg < 303.75) { return 'WNW'; } elsif($deg < 326.25) { - return 'Northwest'; + return 'northwest'; } elsif($deg < 348.75) { return 'NNW'; } else { - return 'North'; + return 'north'; } } |
|
From: Kevin S. <ks...@us...> - 2006-08-02 00:54:54
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21143 Modified Files: simbot.pl Log Message: Here you go... :) Index: simbot.pl =================================================================== RCS file: /cvsroot/simbot/simbot/simbot.pl,v retrieving revision 1.146 retrieving revision 1.147 diff -u -d -p -r1.146 -r1.147 --- simbot.pl 17 Jan 2006 11:22:00 -0000 1.146 +++ simbot.pl 2 Aug 2006 00:54:50 -0000 1.147 @@ -205,7 +205,7 @@ if(option('chat','snooze') !~ m/always|n &plugin_register(plugin_id => "help", plugin_params => "<command name>", - plugin_help => "Displays a list of available commands. Adding a command name as a parameter will display help text for that command.", + plugin_help => "Seems like you've already figured out what this does, eh? Leave off the command for a list.", event_plugin_call => \&print_help, ); |
|
From: Pete P. <fou...@us...> - 2006-03-20 12:48:30
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25673/plugins Modified Files: weather.pl Log Message: Fixed the URL for alerts. Index: weather.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/weather.pl,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -p -r1.109 -r1.110 --- weather.pl 10 Nov 2005 13:02:15 -0000 1.109 +++ weather.pl 20 Mar 2006 12:48:17 -0000 1.110 @@ -879,7 +879,7 @@ sub get_alerts { &debug(3, 'weather: Received forecast request from ' . $nick . " for $lat $long $geocode, in get_alerts\n"); - my $url = 'http://weather.gov/alerts/' . lc($state) . '.cap'; + my $url = 'http://www.weather.gov/alerts/' . lc($state) . '.cap'; my $request = HTTP::Request->new(GET => $url); $request->header('Accept-Encoding' => 'gzip, deflate'); $kernel->post('wxua' => 'request', 'got_alerts', |
|
From: Pete P. <fou...@us...> - 2006-02-05 03:26:38
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21218/plugins Modified Files: sqlite-logger.pl Log Message: Let's make wildcard seen requests work with more than one wildcard. "%seen *" still retarded. Index: sqlite-logger.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/sqlite-logger.pl,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -p -r1.73 -r1.74 --- sqlite-logger.pl 10 Nov 2005 13:02:15 -0000 1.73 +++ sqlite-logger.pl 5 Feb 2006 03:26:30 -0000 1.74 @@ -305,7 +305,7 @@ sub do_seen { # we'll do nothing } elsif ( $seen_nick =~ m/\*/ ) { my $nick_pattern = $seen_nick; - $nick_pattern =~ s/\*/%/; + $nick_pattern =~ s/\*/%/g; $nick_list = 'SELECT id FROM names WHERE name LIKE "' . $nick_pattern . '"'; } elsif ( !( $nick_list = &get_nickchan_id($seen_nick) ) ) { |