Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
Proper support for a 'modified' element actually requires its model
to be defined and added to the RSS Atom namespace.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Don't break when the feed doesn't define categories.
|
|
Some feeds have more than one category. Make all of them available in
the :categories stream key.
|
|
|
|
|
|
Rather than hard-coding the handle, date and title formatting, make it
customizable via appropriate *_wrap keys.
|
|
|
|
Since the RSS update announcements do not expect any form of reply,
they could be considered the typical IRC message that should use
NOTICE rather than PRIVMSG.
However, for backwards compatibility and since NOTICEs are not always
appreciated (and since their handling from clients is not always
optimal, either), we still allow rss announces to use the traditional
method, and that is in fact selected as default. Explicit rss show
request always go with PRIVMSG.
|
|
|
|
Make use of the new custom filter loading procedure to move most of the
type definitions into its own file (data/rbot/filters/rss.rb) and only
define some essential ones in the plugin itself.
As an added benefit, user types can be loaded from filters/rss.rb and
rss/types.rb in the botclass directory.
|
|
|
|
Config option to set the maximum number of items that will be announced
when a feed updates. 0 means all of them, anything else clips the list
to the latest ones, and also announces that some of the updates will not
be listed.
|
|
|
|
If we always abort, a failing first parser will cause a failure even though a
subsequently tried parser succeeded in getting the feed right. So only
return nil if rss was nil when the error list wasn't empty.
|
|
|
|
Commit 36f1f28e668919dfab75c8fc4d1020abad351bd1 borked error handling as
it assumed that a false or nil rss implied a nonempty errors, and it
failed to return early.
Fix by removing the early check for a missing rss and wrapping the
report_problem (and the previously missing 'return nil') in the check
for a nonempty errors array.
|
|
Some feeds fail when parsed by some parsers, but work correctly with
others (e.g. http://www.blueman.com/community/rss fails with xmlparser
but not with REXML). So try all of them and only abort if none works
rather than failing because the default parser fails.
|
|
There is no need to warn when calling watchRss on a watched feed; in
fact, since watchRss() is called every time a watcher is added, it just
spam the channels with a useless message that also provides unnecessary
information. So just return.
|
|
When lots of rss feeds are defined, the bot will flood the channel on
rss list. Fix by showing a compact list when the number of feeds is
higher than the maximum output lines.
|
|
|
|
|
|
Change the parseRss routine to return the number of found items, or nil
in case of error. This helps clearly differentiate between empty feeds
(which are still legit) and b0rked feeds.
This change in logic does not alter the fact that a feed update with no
items will not wipe existing old feed items.
|
|
|
|
Also fix a comment typo on the flyby
|
|
|
|
|
|
The rss parser looks at the encoding specified into the XML file and
converts everything to UTF-8. Since we do the UTF-8 conversion
ourselves, monkey-patch the XML 'encoding' declaration to claim it's
UTF-8 already (as it actually is).
|
|
When the feed handle is empty or not used (e.g. during rss show), the
headlines output filter will display the date before the title.
|
|
|
|
A simple output format that only provides feed titles, skipping all
other data, including the feed link. Requested by step on #rbot.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't map over all parameters, because some parameters might not respond
to empty?. Also, it's unnecessarily slow. Just return as soon as we
found a nonempty parameter.
|
|
|
|
RSS htmlinfo filter was catching some false positives because
some web pages have embedded RDF resources (e.g. for trackbacks)
even though they are not RSS feeds. So check for the obligatory
channel tag when an rdf:RDF tag is found.
|
|
|
|
|
|
|