Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The way objects are currently searched inside Mechanize objects is
deprecated in WWW::Mechanize version 0.9.0, so we switch to the
preferred syntax.
|
|
|
|
|
|
When passing on the Array of split words from unreplied() to facts()
make sure that the passed argument behaves like an Array/String from
the MessageMapper.
|
|
|
|
|
|
Define configuration keys for maximum and default number of user data
items output, with a separate value for shouts (which are usually much
more verbose and therefore would have a much lower maximum and default).
Each command also allow the specification of the number of entries
actually output (different than the default, clipped at the configured
maximum.
This way user data has the same rate limiting as events.
Internally, the switches for the user data are also made more uniform to
select, where it makes sense, different sentences depending on how many
entries are being displayed (none, all, some).
|
|
|
|
|
|
|
|
This should help people find the right package.
|
|
|
|
We provide two methods that make it more simple and elegant for
botmodules to define paths relative to the bot's own directory
(botclass) and to the BotModule's (assumed) non-registry directory.
The first method is Irc::Bot#path(), which joins its arguments with the
botclass. This method can be used to access datafiles in the bot
directory with a much cleaner syntax; and since it uses File.join, the
resulting paths are also properly formatted on each platform, which
doesn't hurt.
Each BotModule now also carries a dirname() method that should return the
directory under botclass that holds the BotModule's datafiles. dirname()
defaults to the BotModule's name(), but it can be overridden, e.g. for
backwards compatibility (see the patch for the quotes plugin), or
for BotModules that share their datafiles.
Datafiles can be accessed using the BotModule#datafile() method that
joins the botclass, the dirname() and whatever other argument is passed.
|
|
This ensures that 'lastfm who' triggers the correct map.
|
|
|
|
there to make replies consistent with rbot's usual style
|
|
|
|
aliases in @registry are favored over literal last.fm users
|
|
nonexistent user(s)
|
|
|
|
|
|
|
|
|
|
The geoip plugin defines and makes use of a GeoIP module to handle the
actual geoip data retrieval. The module used to be defined in the same
namespace as the plugin, and therefore in a barely accessible anonymous
module.
Move the GeoIP module to the outermost namespace to allow it to be
accessible from scripts and plugins too.
|
|
GeoIP tool also offer latitude and longitude, so read them as well.
|
|
Move the whitelist and badwords check in the message() method instead of
triggering on listen(). This is more correct and more efficient, and it
ensures that the whitelist protects mass-highlighters too.
|
|
When a masshl ban is added, the bot will ban (or kick or whatever)
anybody that calls more than a given fixed number of users or a
percentage of in-channel users.
|
|
|
|
Turn the confession extraction into its own method, and use it both for
specific and random confession retrieval.
|
|
The real confessions are in the 'main' div, so rather than
second-guessing their true location (and getting it wrong every time the
site changes layout), just skip to the 'main' div before looking for
content.
|
|
|
|
|
|
hh:mm
|
|
|
|
|
|
|
|
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.
|
|
|
|
Due to the way mapping work, quote commands whose first parameter is a
channel must be mapped before the ones that implicitly refer to the
current channel.
This has the upside that they really work, and the downside that
commands that refer to the current channel must specify the channel if
their argument begins wit something that looks like a channel spec.
However, this last case is extremely rare, so we're fine.
|