Giuseppe Bilotta [Wed, 29 Sep 2010 23:37:05 +0000 (01:37 +0200)]
IRC framework: Server#to_s must always return a String
Having Server#to_s alias the hostname would cause problems when the
hostname was nil (e.g. after a disconnect). Fix by making sure that to_s
always returns a string instead.
Giuseppe Bilotta [Mon, 27 Sep 2010 11:52:14 +0000 (13:52 +0200)]
* wrap BDB::Fatal classes for abstract trapping
When using a DB backend different from BDB, the BDB constant may not be
defined, causing a NameError during error trapping in the main loop. Fix
this by defining our own DBFatal error that maps to BDB::Fatal in the
BDB case and is defined as an (unused) Exception for TokyoCabinet.
Giuseppe Bilotta [Thu, 23 Sep 2010 20:20:57 +0000 (22:20 +0200)]
TokyoCabinet: 0.9.5-to-0.9.9 must use BDB only
When upgrading from 0.9.5 data, write the 0.9.9-style regisitry using
BDB still rather than trying to use TokyoCabinet already. This makes
sure that the next step (0.9.9 to modern times) works correctly.
(Moreover, the existing BDB-to-TC attempt wouldn't have worked anyway
due to wrong var names. I doubt anybody will ever hit this path and
notice though.)
Giuseppe Bilotta [Wed, 15 Sep 2010 12:09:42 +0000 (14:09 +0200)]
tumblr: support reblogging and fix HTML issues
Detect tumblr posts and use the reblogging API to post them. Also
produce HTML-escaped lines for video and photo captions because
the format=markdown specification doesn't seem to apply to them.
When OAuth is missing, some barebone functionality in the twitter plugin
is still available (namely, status reading from public timelines), so
don't fail loading and just warn the users and admins about the reduced
availability.
There was a bug in "twitter pin" functionality where it didn't
check to verify that the PIN entered by the user was valid. As
a result, if the user entered an invalid PIN, the bot would
not respond as to whether or not twitter account binding was
successful. I replaced it with an error message if the PIN
is invalid. I also changed the error message for someone
who tries to enter a PIN without first using "twitter
authorize" to be more clear.
Module now requires twitter.key and twitter.secret config parameters for
write access and private users' statuses. Added twitter authorize,
twitter deauthorize, and twitter pin features, removed twitter identify
feature, as basic authentication is no longer supported.
Atom categories don't have a content attribute, and obviously they don't
have an empty? method. Squash them to their label rather than bombing
out with error during the blank2nil processing.
Freshmeat now provides the news in XML form under /index.xml, which
provides more information, and in a more computer-friendly way. Use that
if possible (correctly-configured API token), fall back to RSS parsing
otherwise.
When a redirect has a Set-Cookie: header, check if the cookie domain is
valid for the host we are redirected to. If not, don't set the cookie
in the new request.
We sometimes skip releases for such a long time that we forget what
exactly we have to do, and in what order. Let's keep this list in view
and up-to-date
This allows lazy players to specify the color after playing the wild by
pressing up-arrow and adding the color to the previous line, without
running the risk of playing their precious second wild.
The public announcement is now a generic "can't do that", with the
specific message being notified to the user. This reduces the chance of
other players guessing what the current player has from the error
messages.
The old XML files are not accessible, sadly, and the new API requires an
auth token. But at least it works again. For updates, we use the RSS
feed, parsing it manually.
Define a rule in the Rakefile to generate them, and change the Dir[]
into a FileList[] into the gemspec. The latter change has the downside
of requiring Rake's FileList, but the upside of listing non-existing
files, so that Rake can create them, if possible, or complain if they
are just missing.
David Gadling [Sat, 13 Mar 2010 05:53:06 +0000 (21:53 -0800)]
url: Add a config option to auto-shorten URLs.
shortenurls: Add a favorite service config option.
Auto-shortening URLs is mutually exclusive with showing information about them as the output would be very confusing.
The favorite shortenting service option only really applies when other plugins call shortenurls.shorten, so they don't have to hard-code which shortening service to use.
David Gadling [Wed, 3 Feb 2010 02:43:38 +0000 (18:43 -0800)]
autoop: Add a 'restore' command that will op anybody that would be autooped.
This goes through the list of hostmasks that would be opped in the channel, and
checks to see if any of them are currently not opped. If they're not, they're opped.
Giuseppe Bilotta [Mon, 28 Jun 2010 22:55:10 +0000 (00:55 +0200)]
Move English messages from po/en_US to po/en
When using gettext, the bot will look for English messages in the 'en'
locale, rather than en_US. This causes some Ruby GetText version to
not find the .mo files, which used to be stored as en_US instead. Since
Ruby's GetText seems to be too stupid to fall back to en_US when en is
not found, we move the messages to en.
This is also probably more correct from a linguistic standpoint, since
the messages are actually mostly British English due to the bot origin.