rbot
11 years agosearch: fix google oblomov/master
Giuseppe Bilotta [Mon, 14 May 2012 11:59:39 +0000 (13:59 +0200)] 
search: fix google

11 years agoutils: support hex HTML entities
Giuseppe Bilotta [Mon, 14 May 2012 11:59:20 +0000 (13:59 +0200)] 
utils: support hex HTML entities

11 years agodb adaptors: nil internal variable when closing
Giuseppe Bilotta [Mon, 30 Apr 2012 19:50:02 +0000 (21:50 +0200)] 
db adaptors: nil internal variable when closing

This prevents subsequent spurious flushes from bombing out because of
closed databases.

11 years agoquakeauth: notify when identified
Giuseppe Bilotta [Mon, 30 Apr 2012 12:00:43 +0000 (14:00 +0200)] 
quakeauth: notify when identified

This ensures that joining after identification (config setting
irc.join_after_identify) works correctly with quake auth too.

12 years agoweather: use proper units text when using config option
Giuseppe Bilotta [Mon, 26 Mar 2012 16:22:38 +0000 (18:22 +0200)] 
weather: use proper units text when using config option

Previously, if units was false (no units specified), wu_units would
become "_false" instead of "_<whatever was in the config value>".

12 years agoForecast plugin patch
Giuseppe Bilotta [Tue, 20 Mar 2012 11:13:17 +0000 (12:13 +0100)] 
Forecast plugin patch

"I've updated the forecast plugin, the two API URLs used had been updated and
the NOAA SOAP API method call now requires 6 arguments instead of the 5 it was
passing previously." (Ticket #89)

12 years agoRubyGems obsoleted *and* b0rked all_load_path, try to work around it
Giuseppe Bilotta [Sun, 4 Mar 2012 20:16:46 +0000 (21:16 +0100)] 
RubyGems obsoleted *and* b0rked all_load_path, try to work around it

12 years agohttputil: work (sub-par) without iconv
Giuseppe Bilotta [Sat, 3 Mar 2012 18:04:34 +0000 (19:04 +0100)] 
httputil: work (sub-par) without iconv

12 years agoDocument iconv dependency
Giuseppe Bilotta [Sat, 3 Mar 2012 17:32:23 +0000 (18:32 +0100)] 
Document iconv dependency

12 years agomath: ruby wants leading 0s to floating points numbers
Giuseppe Bilotta [Wed, 1 Feb 2012 14:24:31 +0000 (15:24 +0100)] 
math: ruby wants leading 0s to floating points numbers

12 years agosearch: fix gcalc
Giuseppe Bilotta [Wed, 25 Jan 2012 08:44:40 +0000 (09:44 +0100)] 
search: fix gcalc

Google changed their layout again. To be a little more future-proof,
split the html into as many <br/> sections as there are, and pick the
first one that contains the literal string ' = ' if there is one.

12 years agogreed: prevent players from going twice in a row
Okasu [Sat, 21 Jan 2012 07:33:15 +0000 (02:33 -0500)] 
greed: prevent players from going twice in a row

12 years agogreed: refactor and prepare for more complete play
Giuseppe Bilotta [Mon, 26 Dec 2011 09:57:54 +0000 (10:57 +0100)] 
greed: refactor and prepare for more complete play

The score is now saved in a look-up table, that also allows more
detailed output when showing the score. Also, the dice rolling
potentially allows for a different number of dices to be rolled (e.g. if
some are held).

Take the opportunity to also gettextize outuput.

12 years agogreed: stylistic changes
Giuseppe Bilotta [Mon, 26 Dec 2011 09:12:31 +0000 (10:12 +0100)] 
greed: stylistic changes

Sort dices when rolling and separate values with spaces.

12 years agoAdd a Greed dice game.
Okasu [Mon, 26 Dec 2011 08:53:16 +0000 (03:53 -0500)] 
Add a Greed dice game.

12 years agoGooglefight plugin fix
Okasu [Sun, 25 Dec 2011 22:13:30 +0000 (17:13 -0500)] 
Googlefight plugin fix

12 years agotwitter: preliminary status htmlinfo filter
Giuseppe Bilotta [Wed, 21 Dec 2011 22:29:35 +0000 (23:29 +0100)] 
twitter: preliminary status htmlinfo filter

This allows the link info published by URL in the new /#!/ format to be
more meaningful than the warning about missing JavaScript support caused
by the new "web 2.0" Twitter site.

12 years agotumblr: fix 'tumblr configure' regexps
Giuseppe Bilotta [Wed, 21 Dec 2011 09:11:29 +0000 (10:11 +0100)] 
tumblr: fix 'tumblr configure' regexps

The way they were, specifying channel, email, password and group caused
the password to be merged with the email and the group to become the
password.

12 years agoImprove first par detection without hpricot
Giuseppe Bilotta [Thu, 8 Dec 2011 15:20:43 +0000 (16:20 +0100)] 
Improve first par detection without hpricot

12 years agomarkov: mention learn in summary help
Giuseppe Bilotta [Wed, 7 Dec 2011 08:12:09 +0000 (09:12 +0100)] 
markov: mention learn in summary help

12 years agomarkov: document 'learn from <file>'
Giuseppe Bilotta [Sun, 4 Dec 2011 05:25:53 +0000 (06:25 +0100)] 
markov: document 'learn from <file>'

12 years agodict: oxford fix from AndrewNTH
Giuseppe Bilotta [Mon, 24 Oct 2011 08:49:22 +0000 (10:49 +0200)] 
dict: oxford fix from AndrewNTH

See tracker issue #79

12 years agoExit for good when getting a DBFatal error
Giuseppe Bilotta [Mon, 24 Oct 2011 08:44:09 +0000 (10:44 +0200)] 
Exit for good when getting a DBFatal error

12 years agoimdb plugin: again fixes outdated ratings pattern
Matthias -apoc- Hecker [Mon, 26 Sep 2011 12:44:25 +0000 (14:44 +0200)] 
imdb plugin: again fixes outdated ratings pattern

12 years agoUNO: prevent player from replaying a misplayed card
Giuseppe Bilotta [Thu, 22 Sep 2011 20:42:02 +0000 (22:42 +0200)] 
UNO: prevent player from replaying a misplayed card

12 years agoBetter handling of akills and other form of disconnections
Giuseppe Bilotta [Thu, 15 Sep 2011 09:44:07 +0000 (11:44 +0200)] 
Better handling of akills and other form of disconnections

12 years agoyoutube: not all urls have v= as first CGI param
Giuseppe Bilotta [Thu, 15 Sep 2011 09:40:44 +0000 (11:40 +0200)] 
youtube: not all urls have v= as first CGI param

12 years agoAn unparseable message from the server is a ServerError
Giuseppe Bilotta [Tue, 30 Aug 2011 05:33:18 +0000 (07:33 +0200)] 
An unparseable message from the server is a ServerError

12 years agobasics: UI command to send NOTICEs
Giuseppe Bilotta [Sun, 28 Aug 2011 21:33:16 +0000 (23:33 +0200)] 
basics: UI command to send NOTICEs

12 years agofix for imdb, changed patterns for ratings&genre
Matthias -apoc- Hecker [Sun, 14 Aug 2011 11:50:02 +0000 (13:50 +0200)] 
fix for imdb, changed patterns for ratings&genre

12 years agoFix TC db close on cleanup
Giuseppe Bilotta [Mon, 11 Jul 2011 15:26:00 +0000 (17:26 +0200)] 
Fix TC db close on cleanup

When closing the TC db on cleanup, we didn't remove it from the
environment. Override the #close() method to achieve that.

12 years agoSaner treatment for connect errors
Giuseppe Bilotta [Sat, 11 Jun 2011 14:26:09 +0000 (16:26 +0200)] 
Saner treatment for connect errors

Rather than raising changing the message (a message that would not be
displayed anyway), display the (composed) error message and then reraise
without further changes.

12 years agoMark threaded mapped messages as replied
Giuseppe Bilotta [Thu, 9 Jun 2011 10:29:07 +0000 (12:29 +0200)] 
Mark threaded mapped messages as replied

This prevents them from being delegated to unreplied() before the processing
thread has the chance to mark it replied. The solution would fail for
threaded messages whose processing would not reply, but I'm not aware of
such a method currently exists.

A future design of the message delegation and mapping could thread the
actual delegation instead, and this problem would be solved.

12 years agoRuby 1.9 can intern empty strings
Giuseppe Bilotta [Fri, 3 Jun 2011 12:02:45 +0000 (14:02 +0200)] 
Ruby 1.9 can intern empty strings

Since in the subsequent switc we check for nil, explicitly use
nil when the modifier is empty or nil rather than relying on a rescued
exception.

12 years agoMore outdated message in en translations
Giuseppe Bilotta [Fri, 3 Jun 2011 10:54:00 +0000 (12:54 +0200)] 
More outdated message in en translations

12 years agoUpdate translations
Giuseppe Bilotta [Fri, 3 Jun 2011 10:46:57 +0000 (12:46 +0200)] 
Update translations

12 years agoweather: refactor NWS output
Giuseppe Bilotta [Wed, 11 May 2011 18:25:20 +0000 (20:25 +0200)] 
weather: refactor NWS output

Aside from gettexting, this separates out all the data that is available
in both metric and imperial units, to allow a potential extension for
support for the user choice of units.

Fix heat index and windchill in the mean time.

12 years agoweather: fall back from nws to wu
Giuseppe Bilotta [Wed, 11 May 2011 17:53:37 +0000 (19:53 +0200)] 
weather: fall back from nws to wu

If a user uses NWS as default service and asks for a location that the
our NWS implementation can't retrieve, fall back to the Weather
Underground service.

To simplify this management, rewrite the code to use the bot HTTP util
and its caching functionality.

12 years agoweather: URI-encode station
Giuseppe Bilotta [Wed, 11 May 2011 16:18:04 +0000 (18:18 +0200)] 
weather: URI-encode station

The NWS code assumed that the station could be used as-is in the URL,
which is actually true for the station codes accepted by NWS, but
incorrect in general. People with NWS as the default weather service
would get strange errors about bad URIs if trying something like
"weather birmingham, uk".

Solve by URI-encoding the station name: even if the resulting URL will
still give a 404, at least it doesn't give out odd errors.

12 years agosearch: update gdef to changes in web result
Giuseppe Bilotta [Tue, 10 May 2011 10:53:25 +0000 (12:53 +0200)] 
search: update gdef to changes in web result

12 years agobdb: don't retrieve the db values when warning about nil key
Giuseppe Bilotta [Tue, 10 May 2011 06:19:13 +0000 (08:19 +0200)] 
bdb: don't retrieve the db values when warning about nil key

When either of the keys passed to the BDB compare function is nil, we
emit a warning. In this warning, however, we used to peek at the
registry value, which required the use of the comparison function
itself, falling in a nested loop. Solve by omitting the
self[<key>].inspect from the warning.

12 years agoweather: fix url detection for multiple stations/sites
Giuseppe Bilotta [Mon, 9 May 2011 09:47:26 +0000 (11:47 +0200)] 
weather: fix url detection for multiple stations/sites

12 years agoPreliminary support for the LIST command
Giuseppe Bilotta [Tue, 3 May 2011 17:22:51 +0000 (19:22 +0200)] 
Preliminary support for the LIST command

13 years ago* less eager quit message reset
Giuseppe Bilotta [Sun, 3 Apr 2011 06:28:39 +0000 (08:28 +0200)] 
* less eager quit message reset

Only reset quit message when entering the main loop sanely.

13 years agoutils: support new HTMLEntities interface
Giuseppe Bilotta [Sat, 2 Apr 2011 08:54:15 +0000 (10:54 +0200)] 
utils: support new HTMLEntities interface

Since version 4.1.0, HTMLEntities removed the decode_entities()
class method and uses a decoder since. Support the new interface as well
as the old one.

Also slightly optimize by moving the conditional outside of the method
definition. Now a rescan is required even if HTMLEntities is loaded at
runtime, but the method should be slightly faster.

13 years agoAdd &ndash; to known HTML characters
Giuseppe Bilotta [Wed, 16 Mar 2011 19:26:14 +0000 (20:26 +0100)] 
Add &ndash; to known HTML characters

This was affecting the imdb plugin when htmlentities was not available,
because TV series were split at en dashes, which were being converted to
asterisks when our built-in UNESCAPE_TABLE was being used.

13 years agotwitter plugin: change the api urls to receive RTs
Matthias -apoc- Hecker [Mon, 14 Feb 2011 20:49:32 +0000 (21:49 +0100)] 
twitter plugin: change the api urls to receive RTs

13 years agoauth: force no-nick reply when meeting someone
Giuseppe Bilotta [Mon, 7 Feb 2011 10:35:30 +0000 (11:35 +0100)] 
auth: force no-nick reply when meeting someone

This prevents things such as "nickA: hi, nickB" where nickA is e.g. the
owner and nickB is the newly met user.

13 years agoquiz: stop quizzes and timers on cleanup robbat/master
Giuseppe Bilotta [Thu, 3 Feb 2011 11:53:34 +0000 (12:53 +0100)] 
quiz: stop quizzes and timers on cleanup

This prevents spurious timers from running after a rescan

13 years agoquiz: more consistent autoskip/autoask management
Giuseppe Bilotta [Thu, 3 Feb 2011 10:34:30 +0000 (11:34 +0100)] 
quiz: more consistent autoskip/autoask management

Also respect autoask delay when autoskipping

13 years agoquiz: autoskip feature
Giuseppe Bilotta [Thu, 3 Feb 2011 10:28:07 +0000 (11:28 +0100)] 
quiz: autoskip feature

13 years agoquiz: autoask cleanup
Giuseppe Bilotta [Thu, 3 Feb 2011 09:26:10 +0000 (10:26 +0100)] 
quiz: autoask cleanup

13 years agoquiz: refactor and localize admin help
Giuseppe Bilotta [Thu, 3 Feb 2011 09:14:24 +0000 (10:14 +0100)] 
quiz: refactor and localize admin help

13 years agoquiz: refactor quiz db problem announcement
Giuseppe Bilotta [Thu, 3 Feb 2011 09:09:19 +0000 (10:09 +0100)] 
quiz: refactor quiz db problem announcement

13 years agoquiz: autoask status query
Giuseppe Bilotta [Thu, 3 Feb 2011 09:01:55 +0000 (10:01 +0100)] 
quiz: autoask status query

13 years agohttputil: nicer UI message when lacking ssl
Giuseppe Bilotta [Wed, 2 Feb 2011 09:04:56 +0000 (10:04 +0100)] 
httputil: nicer UI message when lacking ssl

Rather than complaining about a missing use_ssl= method, if net/https
fails to load we define a mock use_ssl= method that raises a runtime
error making the LoadError message public. This is not the most
user-friendly message (we would prefer not to expose internals), but
it should be clear enough to help owners that forget to read the log
find what's missing.

13 years agocomments and message fixes
Giuseppe Bilotta [Mon, 31 Jan 2011 14:21:15 +0000 (15:21 +0100)] 
comments and message fixes

13 years agoweather: defaults for missing service
Giuseppe Bilotta [Sun, 30 Jan 2011 20:58:00 +0000 (21:58 +0100)] 
weather: defaults for missing service

The refactoring that introduced google removed them erroneously.

13 years agobdb: support running without envs
Giuseppe Bilotta [Fri, 28 Jan 2011 09:07:44 +0000 (10:07 +0100)] 
bdb: support running without envs

The various checkpointing function may be called when no env has been
loaded (yet), support this.

13 years agoTokyoCabinet pseudo-environment
Giuseppe Bilotta [Wed, 26 Jan 2011 17:36:55 +0000 (18:36 +0100)] 
TokyoCabinet pseudo-environment

Since TokyoCabinet does not provide a DB environment, trying to reopen
the same db multiple times (something that happens with subregistry
mostly, and possibly after rescans) causes the subsequent opens to fail
due to "threading errors".

Fix by implementing some sort of environmentalish database management
(only keeps track of open databases, returns existing ones if reopening
the same db multiple times, closes all of them on exit).

13 years agoweather: support google service too
Giuseppe Bilotta [Wed, 26 Jan 2011 16:08:25 +0000 (17:08 +0100)] 
weather: support google service too

13 years agoweather: use bot standard html cleanup functions
Giuseppe Bilotta [Wed, 26 Jan 2011 12:11:26 +0000 (13:11 +0100)] 
weather: use bot standard html cleanup functions

Get rid of wu_clean and replace it with ircify_html or riphtml depending
on context.

13 years agoweather: config option for default units
Giuseppe Bilotta [Wed, 26 Jan 2011 12:21:44 +0000 (13:21 +0100)] 
weather: config option for default units

13 years agohtml entities: add deg
Giuseppe Bilotta [Wed, 26 Jan 2011 12:36:41 +0000 (13:36 +0100)] 
html entities: add deg

The symbol appears in weather underground data an was not being escaped
when htmlentities was not available

13 years agoextends: fix riphtml
Giuseppe Bilotta [Wed, 26 Jan 2011 12:31:53 +0000 (13:31 +0100)] 
extends: fix riphtml

13 years agoRuby 1.9 cleanup: variables warnings
Giuseppe Bilotta [Wed, 12 Jan 2011 21:15:12 +0000 (22:15 +0100)] 
Ruby 1.9 cleanup: variables warnings

Fix most ruby 1.9 warnings about shadowed variables (still one remaining in
keywords.rb). The only significant changes are in the quiz game plugin.

Also fix an issue in dictclient where the block parameter of a method
was not correctly isolated from the previous parameter.

13 years agoLimit Comparable inclusion to Array
Giuseppe Bilotta [Wed, 12 Jan 2011 20:25:57 +0000 (21:25 +0100)] 
Limit Comparable inclusion to Array

Including Comparable at the top level causes infinite recursions in Ruby
1.9.2

13 years agoLoad the 1.9 compatibility code earlier
Giuseppe Bilotta [Wed, 12 Jan 2011 20:06:27 +0000 (21:06 +0100)] 
Load the 1.9 compatibility code earlier

The compat19 code touches the monitor mixins which are used by the
logger which is started as soon as ircbot.rb is loaded. To make sure the
logger uses the compat code we must load compat19 before ircbot.

13 years agorss: obviously, the precending patch wasn't enough
Giuseppe Bilotta [Tue, 11 Jan 2011 14:17:02 +0000 (15:17 +0100)] 
rss: obviously, the precending patch wasn't enough

Proper support for a 'modified' element actually requires its model
to be defined and added to the RSS Atom namespace.

13 years agorss: updated can be nil
Giuseppe Bilotta [Tue, 11 Jan 2011 10:35:59 +0000 (11:35 +0100)] 
rss: updated can be nil

An Atom item can reply to updated even though its value is nil, so
check for it actually being valued instead. Also, some malformed Atom
feeds use the nonstandard 'modified' element instead, so check for that
too.

13 years agofake message: set replied on reply
Giuseppe Bilotta [Fri, 31 Dec 2010 09:20:55 +0000 (10:20 +0100)] 
fake message: set replied on reply

Although the reply method for fake messages was actually relying on the
original, we still need to set 'replied' to prevent the fake message
from being wrongly delegated to 'unreplied'.

The most obvious bug this commit fixes is the potentially infinite loop
triggered by defining a command reaction triggered by the command name
itself (e.g. reply to ping with cmd:ping).

13 years ago+ Array#delete_if_at
Giuseppe Bilotta [Sun, 12 Dec 2010 20:36:52 +0000 (21:36 +0100)] 
+ Array#delete_if_at

Allow deletion of an element from the array iff it's at a given position (or in
a given range of positions).

13 years agosmall updates for italian markov
Giuseppe Bilotta [Sat, 11 Dec 2010 16:44:07 +0000 (17:44 +0100)] 
small updates for italian markov

13 years agotime plugin: check if argument is a nick earlier
Giuseppe Bilotta [Sat, 11 Dec 2010 13:42:17 +0000 (14:42 +0100)] 
time plugin: check if argument is a nick earlier

When !time <somenick> was being used and the user <somenick> hadn't set
his or her location, the bot would wrongly assume the argument was some
timezone.

Fix by checking against local nicks first.

13 years agogeoip: blogama is dead, long live ipinfodb
Giuseppe Bilotta [Fri, 10 Dec 2010 20:46:40 +0000 (21:46 +0100)] 
geoip: blogama is dead, long live ipinfodb

Sadly, the new ipinfodb API requires an API key, and I don't know yet if
I'm allowed to redistributed it (I'm betting on no, but in case I can
it will added with an appropriate patch).

13 years agoUNO!: when the game hasn't started, it's nobody's turn
Giuseppe Bilotta [Thu, 9 Dec 2010 10:41:07 +0000 (11:41 +0100)] 
UNO!: when the game hasn't started, it's nobody's turn

13 years agoUNO!: prevent joins after a challengeable card
Giuseppe Bilotta [Thu, 9 Dec 2010 10:32:49 +0000 (11:32 +0100)] 
UNO!: prevent joins after a challengeable card

If someone joins after a challengeable W+4, he would be inserted between
the last and first player, and if there is a challenge _his_ cards would
be exposed. So prevent joining in such a situation.

13 years agoUNO!: reset must_play when changing turn
Giuseppe Bilotta [Wed, 8 Dec 2010 12:24:02 +0000 (13:24 +0100)] 
UNO!: reset must_play when changing turn

After a successful challenge, the challenged player can choose to
pick&pass instead of playing one of its allowed cards. In such a case,
the must_play array would not get reset, preventing the next player to
be able to play any of its card.

Fix by resetting must_play on next_turn rather than on set_discard.

13 years agoUNO!: early exit when checking if W+4 was legal
Giuseppe Bilotta [Wed, 8 Dec 2010 11:54:45 +0000 (12:54 +0100)] 
UNO!: early exit when checking if W+4 was legal

Exit as soon as we find a card that reveals that the W+4 was not a valid
move.

13 years agoauth module: update for messagemapper changes
Giuseppe Bilotta [Wed, 8 Dec 2010 09:47:26 +0000 (10:47 +0100)] 
auth module: update for messagemapper changes

Since commit a993d1c358e24ab85621568c10411c5496e2dea8, the message
mappers have a more rational way of reporting failures, but the auth
module was not using it, resulting in the wrong permissions being
granted/revoked whenever allow/deny was being used.

13 years agoMore gettext frozen string woes
Giuseppe Bilotta [Tue, 7 Dec 2010 22:04:53 +0000 (23:04 +0100)] 
More gettext frozen string woes

13 years agoThe mIRC color for white is 0, not 16
Giuseppe Bilotta [Tue, 7 Dec 2010 16:57:14 +0000 (17:57 +0100)] 
The mIRC color for white is 0, not 16

Default mIRC colors are 0-15, and some clients don't react too well to a
color > 15, while most wrap or default. Konversation, for example, will
stop the color command parsing and interpret it as color 1, followed by
the literal digit 6.

So use the 'official' (mIRC) value of 0 for white.

13 years agoGreet plugin: bot should not greet himself
Giuseppe Bilotta [Tue, 7 Dec 2010 08:12:04 +0000 (09:12 +0100)] 
Greet plugin: bot should not greet himself

13 years agopoll: missing choice value in reply
Giuseppe Bilotta [Tue, 30 Nov 2010 17:52:43 +0000 (18:52 +0100)] 
poll: missing choice value in reply

13 years agopoll: cope with gettext frozen string
Giuseppe Bilotta [Tue, 30 Nov 2010 17:46:06 +0000 (18:46 +0100)] 
poll: cope with gettext frozen string

Some gettext versions freeze the string they return, so dup them before
modifying them.

13 years agorss: watch handle case during rename
Giuseppe Bilotta [Thu, 25 Nov 2010 16:53:57 +0000 (17:53 +0100)] 
rss: watch handle case during rename

We allow rss handles to be of any case on creation, even though matching
is case-insentivie. However, when renaming an rss using 'rss change
handle' and only changing the case, two things prevented this from
working correctly:
* since the new downcased handle was equal to the old downcased handle,
  the bot would prevent the renaming due to the existence of the new
  handle
* the new handle was forcefully downcased, preventing the user
  from renaming handle 'case' to 'CaSe'.

Fix by checking for this case explicitly, and handling it separately.

13 years agoremind: fix presence of 'in', 'every' or 'at' in message
Giuseppe Bilotta [Thu, 25 Nov 2010 12:49:15 +0000 (13:49 +0100)] 
remind: fix presence of 'in', 'every' or 'at' in message

if 'in' was present in the message but not part of the time
specification (e.g. because the specification was with 'every' or with
'at'), the parser would fail at the first attempt (look for time after
'in') and fail unnecessarily.

Fix by trying all possibilities and only giving an error if none
succeeds.

13 years agorss plugin: don't fail when feed.last_success is nil
Giuseppe Bilotta [Thu, 18 Nov 2010 15:08:19 +0000 (16:08 +0100)] 
rss plugin: don't fail when feed.last_success is nil

The first_run check comparing the time delta from last success failed
when feed.last_success was nil. Prevent this from happening by checking
if we are on the first run before the rest of the checks.

13 years agoimdb: fix title regexp for missing second date
Giuseppe Bilotta [Tue, 9 Nov 2010 19:53:49 +0000 (20:53 +0100)] 
imdb: fix title regexp for missing second date

13 years agoUNO!: fix g9r9 fix
Giuseppe Bilotta [Mon, 8 Nov 2010 19:25:06 +0000 (20:25 +0100)] 
UNO!: fix g9r9 fix

Commit a306b2c68eb58c1c88057ff7ee78895401adb6a9 introduced a fix to
prevent a player from playing something like g9r9, but the fix actually
prevented any single-card play. Fix by making the \1 optional.

13 years agourban: fix regexp
Giuseppe Bilotta [Sun, 31 Oct 2010 11:38:42 +0000 (12:38 +0100)] 
urban: fix regexp

13 years agouno plugin: don't allow g9r9 card specification
Giuseppe Bilotta [Mon, 18 Oct 2010 22:39:13 +0000 (00:39 +0200)] 
uno plugin: don't allow g9r9 card specification

The regexp should make sure that the second card is equal to the first
specified card, instead of matching the card expression one or two
times. Otherwise, a play like 'pl g9r9' would be accepted when the
player had two r9 cards and could play them.

This is only a aesthetical change because the plays would still be
valid, albeit (1) surprising and (2) mismatching what the user actually
wrote.

13 years agotranslator: don't show provider
Raine Virta [Mon, 4 Oct 2010 16:39:50 +0000 (19:39 +0300)] 
translator: don't show provider

13 years agoimdb: restore 'character of' functionality
Giuseppe Bilotta [Thu, 14 Oct 2010 13:08:30 +0000 (15:08 +0200)] 
imdb: restore 'character of' functionality

13 years agoimdb: update to latest html
Giuseppe Bilotta [Thu, 14 Oct 2010 11:18:54 +0000 (13:18 +0200)] 
imdb: update to latest html

13 years agosearch: gcalc fix
Giuseppe Bilotta [Thu, 14 Oct 2010 09:16:02 +0000 (11:16 +0200)] 
search: gcalc fix

Google changed their HTML again, breaking gcalc. Fix by using the WAP
search and get the first result if it contains an equal sign.

13 years agosafe_exec fixes
Giuseppe Bilotta [Thu, 14 Oct 2010 08:35:26 +0000 (10:35 +0200)] 
safe_exec fixes

Some plugins (ri, fortune) wrap safe_exec in begin/rescue blocks that
did not get triggered because the exceptions from the execution were
caught in the popen block (and would never get exposed anyway). Fix this
by raising if $? does not indicate success.

13 years agodictclient: monkeypatch DICTError
Giuseppe Bilotta [Thu, 14 Oct 2010 08:15:47 +0000 (10:15 +0200)] 
dictclient: monkeypatch DICTError

The Ruby/DICT library is so tightly coupled with the rdict client that
its errors exit on initialize, instead of letting the lib user do that.
This makes those errors untrappable from the code.

Fix by monkeypatching DICTError to just act like the other exceptions in
Ruby.

13 years agoyoutube: fix detection of video pages
Giuseppe Bilotta [Tue, 12 Oct 2010 15:05:21 +0000 (17:05 +0200)] 
youtube: fix detection of video pages

13 years agoTokyoCabinet #fwmkeys() expects a string
Giuseppe Bilotta [Wed, 6 Oct 2010 18:52:29 +0000 (20:52 +0200)] 
TokyoCabinet #fwmkeys() expects a string

Convert the (optional) first argument to #each*() methods to a string to
ensure the calls work as expected. This fixes a problem with
@registry.each not working as expected, and although it would have been
sufficient to convert the default for the first argument from nil to the
empty string, the approach implemented by this patch is more robust
overall.