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.
Yaohan Chen [Fri, 21 May 2010 19:59:29 +0000 (15:59 -0400)]
translator: connect to sites only when necessary
Previously the translation services in the plugin would connect to their
respective websites on initialize. Now they will only do this when the first
time they are used. WorldLingo still connects on initialialize in order to list
the supported language pairs, but the Mechanize object is not saved here, so
the connection should be closed after initialize, and only reopened if
translation by WorldLingo is requested later.
Previously the services are assumed to fail if they raise any Exception in
initialize, and in that case the service is disabled, and its command as well
as the help translate [failed] commands state this. Now this exception catch is
done for any do_translate method call.
Giuseppe Bilotta [Wed, 12 May 2010 10:57:40 +0000 (12:57 +0200)]
Survive active_support idiocy
Somebody should hang the ActiveSupport developers by their balls
with barbed wire. Their MissingSourceFile extension to LoadError
_expects_ a second argument, breaking the usual Exception interface
(instead, the smart thing to do would have been to make the second
parameter optional and run the code in the from_message method if
it was missing).
translator: additional help for google translate auto-detect failure
When translate command is used without source language, "auto" as source
language is assumed. It means that google translator is used and we let
google figure out what the source language is.
Problem is that the google translator will fail if the system that the
bot is running on does not have the json gem installed. This commit
addresses that problem by showing more informative error message instead
of a weird "none of the translators supports auto to en translation".
Giuseppe Bilotta [Tue, 16 Mar 2010 14:16:20 +0000 (15:16 +0100)]
seen: use corret 'where' in 'before' case
For the 'before' part of the reply, make sure we use the where
from the correct Saw. Otherwise, for example, a public message
preceeding a quit would show a dangling 'in ' at the end of the reply.
The new Freenode ircd returns multiple RPL_WHOISCHANNELS lines (split
based on length), and they must be merged, otherwise only the last ends
up as the list of channels that the bot is in.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>