Raine Virta [Thu, 26 Feb 2009 17:30:06 +0000 (19:30 +0200)]
Separate @dirs containing all botmodules (plugins and core modules)
into @core_module_dirs and @plugin_dirs
Giuseppe Bilotta [Fri, 27 Feb 2009 21:22:48 +0000 (22:22 +0100)]
Italian PO update
Spencer Rinehart [Fri, 27 Feb 2009 01:27:55 +0000 (20:27 -0500)]
hangman: fix score fetching to work for offline users.
m.server.get_user doesn't work for offline users so use what was given
instead.
Raine Virta [Wed, 25 Feb 2009 23:03:52 +0000 (01:03 +0200)]
finnish localization for basic expressions
Raine Virta [Wed, 25 Feb 2009 02:25:52 +0000 (04:25 +0200)]
lastfm: add venue command
Raine Virta [Wed, 25 Feb 2009 00:15:48 +0000 (02:15 +0200)]
lastfm: find events by venue
Raine Virta [Tue, 24 Feb 2009 23:56:05 +0000 (01:56 +0200)]
lastfm: add method for searching venues
Raine Virta [Tue, 24 Feb 2009 23:17:00 +0000 (01:17 +0200)]
lastfm: show link to the user's profile in np action
Raine Virta [Tue, 24 Feb 2009 22:46:48 +0000 (00:46 +0200)]
lastfm: group same tracks in recent tracks
Raine Virta [Tue, 24 Feb 2009 22:24:26 +0000 (00:24 +0200)]
lastfm: add missing 's
Raine Virta [Tue, 24 Feb 2009 21:52:31 +0000 (23:52 +0200)]
markov: add config option for delay in learning thread
Raine Virta [Tue, 24 Feb 2009 21:12:16 +0000 (23:12 +0200)]
markov: organize help
Raine Virta [Tue, 24 Feb 2009 18:51:22 +0000 (20:51 +0200)]
markov: add command for learning from files
Raine Virta [Tue, 24 Feb 2009 17:17:54 +0000 (19:17 +0200)]
search: add command 'lucky'
Sometimes you just wish to google the first hit and have a clutter free
output showing only the url.
Raine Virta [Sun, 22 Feb 2009 16:39:33 +0000 (18:39 +0200)]
seen: add part message if any
Raine Virta [Sun, 22 Feb 2009 16:36:00 +0000 (18:36 +0200)]
seen: add double quotes around user written messages
Raine Virta [Sun, 22 Feb 2009 16:24:01 +0000 (18:24 +0200)]
seen: show what user said or did before leaving
Raine Virta [Sun, 22 Feb 2009 16:14:36 +0000 (18:14 +0200)]
seen: cyclically store two of the users' latest actions in the registry
Raine Virta [Thu, 19 Feb 2009 20:48:39 +0000 (22:48 +0200)]
markov: enable gettext for more replies
Spencer Rinehart [Thu, 18 Dec 2008 20:42:13 +0000 (15:42 -0500)]
uno: Mark all uno commands replied.
Spencer Rinehart [Thu, 18 Dec 2008 20:41:51 +0000 (15:41 -0500)]
markov: Only work with unreplied messages.
Giuseppe Bilotta [Tue, 24 Feb 2009 20:48:34 +0000 (21:48 +0100)]
lastfm: catch all errors when connecting
Since httputil.get_response() can raise exceptions, catch them into an
appropriate block. Turn a missing response body into a runtime error to
handle this error conditions consistently with other exceptions.
Spencer Rinehart [Mon, 23 Feb 2009 17:45:21 +0000 (12:45 -0500)]
seen: If nick doesn't match exactly, fallback to a regexp search (#19).
Spencer Rinehart [Mon, 23 Feb 2009 13:45:37 +0000 (08:45 -0500)]
url: Only reply with disabled host message when url info directly requested.
Giuseppe Bilotta [Sat, 21 Feb 2009 19:03:53 +0000 (20:03 +0100)]
markov: try harder when generating strings
generate_strings() is now able to work with a single word. Additionally,
when the given lookup is not found in the database, it will try
lookups that start, and failing that include, the given one.
Giuseppe Bilotta [Sat, 21 Feb 2009 17:01:30 +0000 (18:01 +0100)]
markov: learn vs learn_line
Make learn a higher-level function that queues one or more lines, and
make learn_line the low-level database access method.
Giuseppe Bilotta [Sun, 22 Feb 2009 00:45:37 +0000 (01:45 +0100)]
registry: expose set and bulk parameters
expose set and bulk parameters in the each*() iterators. Some plugins
might need it for faster lookup.
Giuseppe Bilotta [Sat, 21 Feb 2009 23:25:35 +0000 (00:25 +0100)]
registry: spare useless I/O
The each_key()/each_value() methods of the accessor relied on the each()
method of the database, wasting I/O bandwidth and time by loading
unnecessary data (particularly when running each_key() on databases with
ridiculously enormous values such as in the markov plugin case).
Raine Virta [Thu, 19 Feb 2009 14:26:34 +0000 (16:26 +0200)]
remove whitespace
Raine Virta [Thu, 19 Feb 2009 01:49:08 +0000 (03:49 +0200)]
lastfm: require num parameter for lastfm action to be an integer
Raine Virta [Thu, 19 Feb 2009 01:45:52 +0000 (03:45 +0200)]
lastfm: make "tracks" optional in mappings for lovedtracks and recenttracks
Raine Virta [Thu, 19 Feb 2009 01:40:26 +0000 (03:40 +0200)]
lastfm: fix misplaced parenthesis in output
Raine Virta [Thu, 19 Feb 2009 01:38:16 +0000 (03:38 +0200)]
lastfm: update help
Raine Virta [Wed, 4 Feb 2009 14:07:37 +0000 (16:07 +0200)]
googlefight plugin
Raine Virta [Tue, 17 Feb 2009 17:26:49 +0000 (19:26 +0200)]
translator: fix BabelfishTranslator
Raine Virta [Tue, 17 Feb 2009 16:12:27 +0000 (18:12 +0200)]
translator: fix NiftyTranslator
Raine Virta [Tue, 17 Feb 2009 14:18:38 +0000 (16:18 +0200)]
translator: use *_with(:attribute => value) syntax to find elements
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.
Raine Virta [Tue, 17 Feb 2009 01:59:24 +0000 (03:59 +0200)]
translator: update GoogleTranslator for changes in their web interface
Raine Virta [Mon, 16 Feb 2009 22:38:47 +0000 (00:38 +0200)]
last.fm plugin: list top tags and similar artists in artist info
Giuseppe Bilotta [Tue, 17 Feb 2009 00:01:31 +0000 (01:01 +0100)]
ircbot: fix nil error variable on ServerError
We were making use of an undefined variable e when catching ServerError
in the main loop.
Giuseppe Bilotta [Mon, 16 Feb 2009 22:57:10 +0000 (23:57 +0100)]
factoids: pass proper parameter from unreplied()
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.
Giuseppe Bilotta [Mon, 16 Feb 2009 21:34:23 +0000 (22:34 +0100)]
lastfm: put URL in artist summary
Giuseppe Bilotta [Mon, 16 Feb 2009 21:05:35 +0000 (22:05 +0100)]
lastfm: say something when user top/weekly chart is empty
Giuseppe Bilotta [Mon, 16 Feb 2009 20:14:32 +0000 (21:14 +0100)]
lastfm: limits to user data output
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).
Raine Virta [Mon, 16 Feb 2009 17:49:35 +0000 (19:49 +0200)]
last.fm plugin: rewrote the user-related info retrieval action to API 2.0
Raine Virta [Sun, 15 Feb 2009 23:05:35 +0000 (01:05 +0200)]
last.fm plugin: removed year from event dates
Raine Virta [Sun, 15 Feb 2009 00:35:39 +0000 (02:35 +0200)]
last.fm plugin: list common artists in taste comparison
Giuseppe Bilotta [Sun, 15 Feb 2009 21:43:44 +0000 (22:43 +0100)]
dictclient: put the Ruby/DICT URL in the LoadError message
This should help people find the right package.
Giuseppe Bilotta [Sun, 15 Feb 2009 20:05:30 +0000 (21:05 +0100)]
lastfm plugin: show something when no events are found
Giuseppe Bilotta [Sun, 15 Feb 2009 00:30:51 +0000 (01:30 +0100)]
+ @bot.path and datafile methods
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.
Giuseppe Bilotta [Sat, 14 Feb 2009 22:56:49 +0000 (23:56 +0100)]
ircbot: refactor and clean up botclass dir handling
Use File.join across the board, and refactor some botclass directory
handling. Most important changes:
* failure to create the registry and safe_save directory is now fatal;
* failure to create the local plugin directory prevents it from being
added to the plugin path (with a warning);
* botclass directory update from templates is now a standalone routine
called during init, making it possible to use it in other cases too.
Giuseppe Bilotta [Sat, 14 Feb 2009 22:07:40 +0000 (23:07 +0100)]
lastfm: move now playing maps to the bottom
This ensures that 'lastfm who' triggers the correct map.
Raine Virta [Sat, 14 Feb 2009 21:53:45 +0000 (23:53 +0200)]
last.fm plugin: removed redundant mappings
Raine Virta [Sat, 14 Feb 2009 17:38:51 +0000 (19:38 +0200)]
last.fm plugin: enabled gettext on some replies, also small changes here and there to make replies consistent with rbot's usual style
Raine Virta [Thu, 12 Feb 2009 23:54:16 +0000 (01:54 +0200)]
last.fm plugin: first argument of taste comparison now optional
Raine Virta [Thu, 12 Feb 2009 22:50:59 +0000 (00:50 +0200)]
last.fm plugin: simplified last.fm username resolution so that possible user aliases in @registry are favored over literal last.fm users
Raine Virta [Thu, 12 Feb 2009 22:22:52 +0000 (00:22 +0200)]
last.fm plugin: fixed taste comparison xml parsing failing in case of nonexistent user(s)
Giuseppe Bilotta [Thu, 12 Feb 2009 21:35:09 +0000 (22:35 +0100)]
markov: localize strings
Giuseppe Bilotta [Thu, 12 Feb 2009 21:32:24 +0000 (22:32 +0100)]
markov: show queue size only when not empty
Spencer Rinehart [Thu, 12 Feb 2009 20:14:44 +0000 (15:14 -0500)]
markov plugin: add the size of the learning queue to the status message.
Giuseppe Bilotta [Thu, 12 Feb 2009 18:37:49 +0000 (19:37 +0100)]
lastfm: change verb usage and settings
Giuseppe Bilotta [Wed, 11 Feb 2009 22:34:16 +0000 (23:34 +0100)]
ircbot: sendmsg filtering
We allow a filter to manipulate the arguments of sendmsg() by running
them through the filters of the :sendmsg group. The DataStream passed to
the filters has four keys:
:text => the message text
:type => the message type (typically, PRIVSMG or NOTICE)
:dest => the destination (typically, a Channel or User)
:options => options passed to sendmsg, merged with the default ones
Giuseppe Bilotta [Wed, 11 Feb 2009 20:00:22 +0000 (21:00 +0100)]
utils: htmlinfo filtering doc cleanups
Fix a typo in a comment and specify 'htmlinfo' in the debug message.
Giuseppe Bilotta [Tue, 10 Feb 2009 00:19:03 +0000 (01:19 +0100)]
geoip: make the GeoIP module a standalone
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.
Giuseppe Bilotta [Tue, 10 Feb 2009 00:08:00 +0000 (01:08 +0100)]
geoip: also read lat/lon coordinates
GeoIP tool also offer latitude and longitude, so read them as well.
Giuseppe Bilotta [Mon, 9 Feb 2009 23:31:57 +0000 (00:31 +0100)]
bans: put badwords in message() too
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.
Simon Hafner [Sun, 1 Feb 2009 19:08:25 +0000 (20:08 +0100)]
+ (bans) added masshl ban option
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.
Giuseppe Bilotta [Sun, 8 Feb 2009 14:05:59 +0000 (15:05 +0100)]
grouphug: htmlinfo filter
Giuseppe Bilotta [Sun, 8 Feb 2009 13:54:31 +0000 (14:54 +0100)]
grouphug: refactor confession retrieval
Turn the confession extraction into its own method, and use it both for
specific and random confession retrieval.
Giuseppe Bilotta [Sun, 8 Feb 2009 13:34:52 +0000 (14:34 +0100)]
grouphug: fix retrieval of spurious confessions
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.
Giuseppe Bilotta [Sun, 8 Feb 2009 13:04:36 +0000 (14:04 +0100)]
grouphug: log errors
Giuseppe Bilotta [Sat, 7 Feb 2009 18:46:58 +0000 (19:46 +0100)]
bash plugin: split long quotes at markers
Raine Virta [Wed, 4 Feb 2009 21:36:22 +0000 (23:36 +0200)]
remind plugin: added possibility to reference times that are the next day as hh:mm
Raine Virta [Tue, 3 Feb 2009 12:44:05 +0000 (14:44 +0200)]
lastfm plugin: a small change in the last.fm api had broken the artist command
Raine Virta [Tue, 3 Feb 2009 12:42:01 +0000 (14:42 +0200)]
hangman plugin: rudimentary stats tracking along with some other enhancements
Giuseppe Bilotta [Fri, 6 Feb 2009 23:47:58 +0000 (00:47 +0100)]
slashdot plugin: fix filter for multiple articles
Giuseppe Bilotta [Fri, 6 Feb 2009 18:29:32 +0000 (19:29 +0100)]
rss plugin: don't abort if errors were found but rss is defined
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.
Giuseppe Bilotta [Sun, 1 Feb 2009 16:44:01 +0000 (17:44 +0100)]
ircbot: suppress warning
parenthesize argument(s) for future version
dmitry kim [Sat, 31 Jan 2009 22:06:21 +0000 (01:06 +0300)]
+ (plugins/rss) rss.announce_timeout config variable
Giuseppe Bilotta [Sat, 31 Jan 2009 10:49:18 +0000 (11:49 +0100)]
rss plugin: fix return/error handling in parseRss
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.
Giuseppe Bilotta [Fri, 30 Jan 2009 22:41:14 +0000 (23:41 +0100)]
launch_here: be more compatible with git < 1.5.x
People living in the stone age (e.g. those stuck using Debian stable)
still have git 1.4.4.4, which doesn't support git log --pretty=format.
So we parse the git log --pretty=raw format instead, which should be
available even on such older systems.
For the same reason, parse git diff-index --stat instead of git diff
--shortstat.
Giuseppe Bilotta [Fri, 30 Jan 2009 18:28:59 +0000 (19:28 +0100)]
* (registry) rdoc fix
A stupid missing hash sign prevented the full registry accessor doc from
being parsed by rdoc.
Giuseppe Bilotta [Fri, 30 Jan 2009 17:24:34 +0000 (18:24 +0100)]
rss plugin: try all RSS parsers
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.
Giuseppe Bilotta [Fri, 30 Jan 2009 14:40:27 +0000 (15:40 +0100)]
quotes plugin: add missing 'lastquote :channel' map
Giuseppe Bilotta [Fri, 30 Jan 2009 14:35:03 +0000 (15:35 +0100)]
quotes plugin: 'other channel' commands must be mapped earlier
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.
Giuseppe Bilotta [Thu, 29 Jan 2009 20:56:33 +0000 (21:56 +0100)]
IRC Framework: fix wrong rfc casemaps
The RFC1459 casemaps had the non-letter casemapping the wrong way
around. Fix by swapping them.
Giuseppe Bilotta [Wed, 28 Jan 2009 21:53:33 +0000 (22:53 +0100)]
markov plugin: stricter permission on ignore and probability
Giuseppe Bilotta [Wed, 28 Jan 2009 20:39:18 +0000 (21:39 +0100)]
ircbot: optimize ignore loops
Break early from ignore checks, and skip them altogether when the
message is ignored already.
Giuseppe Bilotta [Wed, 28 Jan 2009 20:36:38 +0000 (21:36 +0100)]
ircbot: irc.ignore_channels config option
In some circumstances the user might want to turn the bot into a pure
logbot for some channels. This can now be achieved by adding that
channel to the irc.ignore_channels config key, that makes the bot ignore
all PRIVMSG to that channel (note that notices and service messages such
as joins and parts are still acted on, just like for irc.ignore_users).
Matthias Hecker [Wed, 28 Jan 2009 19:47:00 +0000 (20:47 +0100)]
imdb plugin: fixed the ratings regex
Giuseppe Bilotta [Wed, 28 Jan 2009 17:11:18 +0000 (18:11 +0100)]
rss plugin: don't warn on rewatch
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.
Giuseppe Bilotta [Wed, 28 Jan 2009 17:01:55 +0000 (18:01 +0100)]
rss plugin: compact list of rss feeds
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.
Giuseppe Bilotta [Wed, 28 Jan 2009 13:51:21 +0000 (14:51 +0100)]
ircbot: the reconnect must be protected
The reconnect() call in the main loop must be protected in the
begin/rescue blocks. Most of the rescue blocks can be fall-through,
because the begin/end is wrapped in a loop. The only exception is the
ServerError block that issues a retry lest too_fast is reset to false
even when it should be true.
Giuseppe Bilotta [Tue, 27 Jan 2009 23:17:35 +0000 (00:17 +0100)]
dict plugin: ircify html in demauro search result
Demauro's search results can contain some HTML, so clean it up before
output.
Giuseppe Bilotta [Tue, 27 Jan 2009 22:07:22 +0000 (23:07 +0100)]
quotes plugin: remove a done TODO item
dmitry kim [Tue, 27 Jan 2009 13:27:10 +0000 (16:27 +0300)]
* (rss.rb) bypass the http cache on !rss rewatch
dmitry kim [Tue, 27 Jan 2009 15:11:31 +0000 (18:11 +0300)]
* (httputils) get_response must refresh the cached object even if :cache => false
Giuseppe Bilotta [Tue, 27 Jan 2009 21:16:56 +0000 (22:16 +0100)]
azgame plugin: use Wordlist provider
Giuseppe Bilotta [Tue, 27 Jan 2009 20:58:30 +0000 (21:58 +0100)]
wordlist: strip UTF-8 BOM on load
Some editors put a BOM at the beginning of UTF-8 files, and it's not
stripped by Ruby's String#strip, so we have to get rid of it ourselves.
Giuseppe Bilotta [Tue, 27 Jan 2009 20:54:59 +0000 (21:54 +0100)]
wordlist: exist? method
The new Wordlist.exist? method can be used to check if a wordlist file exists.
It will refuse to check upstream of the wordlist base directory