rbot
15 years agourl: load filters, defaulting to the htmlinfo filter group recover
Giuseppe Bilotta [Sun, 15 Mar 2009 12:48:45 +0000 (13:48 +0100)] 
url: load filters, defaulting to the htmlinfo filter group

15 years agorss: allow easier customization of output formats
Giuseppe Bilotta [Sun, 15 Mar 2009 12:19:38 +0000 (13:19 +0100)] 
rss: allow easier customization of output formats

Rather than hard-coding the handle, date and title formatting, make it
customizable via appropriate *_wrap keys.

15 years agoextends: String#wrap_nonempty
Giuseppe Bilotta [Sun, 15 Mar 2009 11:29:19 +0000 (12:29 +0100)] 
extends: String#wrap_nonempty

We sometimes want to wrap a nonempty String with a given prefix and
postfix. This method makes it a breeze.

15 years agorss: refactor item date generation
Giuseppe Bilotta [Sun, 15 Mar 2009 10:26:40 +0000 (11:26 +0100)] 
rss: refactor item date generation

15 years agorss: configurable announce method
Giuseppe Bilotta [Sun, 15 Mar 2009 10:04:24 +0000 (11:04 +0100)] 
rss: configurable announce method

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.

15 years agorss: clean up options parsing in printFormattedRss
Giuseppe Bilotta [Sun, 15 Mar 2009 09:42:36 +0000 (10:42 +0100)] 
rss: clean up options parsing in printFormattedRss

15 years agorss: refactor rss types loading
Giuseppe Bilotta [Fri, 13 Mar 2009 10:50:27 +0000 (11:50 +0100)] 
rss: refactor rss types loading

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.

15 years agofilters: BotModule user filter loading
Giuseppe Bilotta [Fri, 13 Mar 2009 21:54:05 +0000 (22:54 +0100)] 
filters: BotModule user filter loading

15 years agorss: more detailed forum type
Giuseppe Bilotta [Wed, 11 Mar 2009 18:56:56 +0000 (19:56 +0100)] 
rss: more detailed forum type

15 years agoupdate finnish translation for lastfm
Raine Virta [Fri, 6 Mar 2009 00:25:40 +0000 (02:25 +0200)] 
update finnish translation for lastfm

15 years agolastfm: allow bolding in translations in nowplaying
Raine Virta [Thu, 5 Mar 2009 22:23:12 +0000 (00:23 +0200)] 
lastfm: allow bolding in translations in nowplaying

15 years agofix finnish translation for lastfm
Raine Virta [Thu, 5 Mar 2009 21:25:54 +0000 (23:25 +0200)] 
fix finnish translation for lastfm

15 years agolastfm: fix a bug of uri not showing in loved/neighbors/friends
Raine Virta [Thu, 5 Mar 2009 18:17:23 +0000 (20:17 +0200)] 
lastfm: fix a bug of uri not showing in loved/neighbors/friends

15 years agourl: allow ignoring urls from specific users
Raine Virta [Thu, 5 Mar 2009 18:00:36 +0000 (20:00 +0200)] 
url: allow ignoring urls from specific users

15 years agoupdate finnish translation for lastfm
Raine Virta [Wed, 4 Mar 2009 23:49:39 +0000 (01:49 +0200)] 
update finnish translation for lastfm

15 years agoreaction: spoken reactions should use plainreply, not reply
Giuseppe Bilotta [Mon, 9 Mar 2009 21:16:51 +0000 (22:16 +0100)] 
reaction: spoken reactions should use plainreply, not reply

15 years agoreaction: fix trigger regex to work with non-alphanumeric start/end.
Spencer Rinehart [Mon, 9 Mar 2009 16:07:38 +0000 (12:07 -0400)] 
reaction: fix trigger regex to work with non-alphanumeric start/end.

only match on word boundaries at an end of a trigger if the character at
that end of the trigger is a word character.  In other words, the
trigger "test" should require word boundaries on each side, but the
trigger "@test" should only require one on the right side.

15 years agoyoutube: fix video page detection in htmlfilter
Giuseppe Bilotta [Sun, 8 Mar 2009 19:38:47 +0000 (20:38 +0100)] 
youtube: fix video page detection in htmlfilter

15 years agokeywords plugin: document some more features in help
Giuseppe Bilotta [Sat, 7 Mar 2009 23:07:05 +0000 (00:07 +0100)] 
keywords plugin: document some more features in help

15 years agomessagemapper: fix regexp creation for double-optional templates
Giuseppe Bilotta [Sat, 7 Mar 2009 13:02:55 +0000 (14:02 +0100)] 
messagemapper: fix regexp creation for double-optional templates

When a mapping template had a double optional key such as
  'something [[double] optional]'
the resuting regexp moved the spacing between the (converted)
double brackets, requiring extra spacing before the 'optional'
keyword.

Fix by moving spacing inside all consecutive brackets before converting
brackets into their regexp form.

15 years agohangman: space scores
Giuseppe Bilotta [Sat, 7 Mar 2009 11:20:22 +0000 (12:20 +0100)] 
hangman: space scores

15 years agolastfm: clean up sort order events search mappings
Giuseppe Bilotta [Sat, 7 Mar 2009 10:32:42 +0000 (11:32 +0100)] 
lastfm: clean up sort order events search mappings

Put some requirements for the sort_order specification, to prevent
 lastfm events at alan lomax
to map lomax as a sort order. Also make the 'in' and 'order' words
optional within the optional sord order block, rather than aside, to
prevent them from being ignored in venue names.

15 years agolastfm: refactor map options for events search
Giuseppe Bilotta [Sat, 7 Mar 2009 10:22:27 +0000 (11:22 +0100)] 
lastfm: refactor map options for events search

15 years agolastfm: handle network errors when looking for events by venue
Giuseppe Bilotta [Sat, 7 Mar 2009 10:21:10 +0000 (11:21 +0100)] 
lastfm: handle network errors when looking for events by venue

15 years agolastfm: handle no events when searching by venue
Giuseppe Bilotta [Sat, 7 Mar 2009 10:10:05 +0000 (11:10 +0100)] 
lastfm: handle no events when searching by venue

15 years agolastfm: handle venue not found
Giuseppe Bilotta [Sat, 7 Mar 2009 10:03:34 +0000 (11:03 +0100)] 
lastfm: handle venue not found

15 years agoload rubygems if available
Giuseppe Bilotta [Fri, 6 Mar 2009 20:55:12 +0000 (21:55 +0100)] 
load rubygems if available

Try loading rubygems as soon as we're set up, since it can be needed for
gettext and a number of other things. This also allows us to get rid of
some stupid convoluted tricks in utils.

15 years agoirc: monkeypatch Singleton to make _load and _dump public.
Spencer Rinehart [Fri, 6 Mar 2009 15:08:06 +0000 (10:08 -0500)] 
irc: monkeypatch Singleton to make _load and _dump public.

This is to fix a possible bug in newer versions of ruby where _load was
declared private in singletons.  This would lead to errors where Marshal
could not restore the Singleton.  This "bug" was introduced to ruby
in revisions 16659 and 17396.

15 years agolastfm: allow both 'sort by' and 'sorted by'
Giuseppe Bilotta [Thu, 5 Mar 2009 18:03:20 +0000 (19:03 +0100)] 
lastfm: allow both 'sort by' and 'sorted by'

15 years agoupdate finnish translation for lastfm
Raine Virta [Wed, 4 Mar 2009 23:49:39 +0000 (01:49 +0200)] 
update finnish translation for lastfm

15 years agolastfm: mention "events at <venue>" in the help
Raine Virta [Wed, 4 Mar 2009 23:35:00 +0000 (01:35 +0200)] 
lastfm: mention "events at <venue>" in the help

15 years agolastfm: event sorting
Raine Virta [Wed, 4 Mar 2009 23:31:46 +0000 (01:31 +0200)] 
lastfm: event sorting

15 years agoupdate finnish lastfm translation
Raine Virta [Wed, 4 Mar 2009 19:22:59 +0000 (21:22 +0200)] 
update finnish lastfm translation

15 years agolastfm: use gettext in album format
Raine Virta [Wed, 4 Mar 2009 19:20:45 +0000 (21:20 +0200)] 
lastfm: use gettext in album format

15 years agolastfm: fix bug of album not showing in nowplaying if there's no year
Raine Virta [Wed, 4 Mar 2009 18:43:07 +0000 (20:43 +0200)] 
lastfm: fix bug of album not showing in nowplaying if there's no year

15 years agofinnish translation for Utils.comma_list
Raine Virta [Tue, 3 Mar 2009 06:54:14 +0000 (08:54 +0200)] 
finnish translation for Utils.comma_list

15 years agolastfm: use Utils.comma_list in appropriate places
Raine Virta [Tue, 3 Mar 2009 06:45:30 +0000 (08:45 +0200)] 
lastfm: use Utils.comma_list in appropriate places

15 years agoutils: add a helper method for creating comma separated lists
Raine Virta [Tue, 3 Mar 2009 06:44:20 +0000 (08:44 +0200)] 
utils: add a helper method for creating comma separated lists

15 years agoircbot: enable gettext on "restarting, back in..."
Raine Virta [Mon, 2 Mar 2009 02:07:53 +0000 (04:07 +0200)] 
ircbot: enable gettext on "restarting, back in..."

15 years agofinnish translation for hangman plugin
Raine Virta [Mon, 2 Mar 2009 01:52:14 +0000 (03:52 +0200)] 
finnish translation for hangman plugin

15 years agohangman: enable gettext on some replies and help
Raine Virta [Mon, 2 Mar 2009 02:04:35 +0000 (04:04 +0200)] 
hangman: enable gettext on some replies and help

15 years agohangman: make replies more compatible with gettext
Raine Virta [Mon, 2 Mar 2009 02:01:38 +0000 (04:01 +0200)] 
hangman: make replies more compatible with gettext

_() returns frozen strings in 1.92.0. This patch not only addresses
that, but also makes some of the replies more flexible.

15 years agofinnish translation for last.fm plugin
Raine Virta [Mon, 2 Mar 2009 01:13:38 +0000 (03:13 +0200)] 
finnish translation for last.fm plugin

15 years agolastfm: make replies more compatible with gettext
Raine Virta [Mon, 2 Mar 2009 01:34:54 +0000 (03:34 +0200)] 
lastfm: make replies more compatible with gettext

_() returns frozen strings in 1.92.0. This patch not only addresses
that, but also makes some of the replies more flexible.

15 years agofinnish translation for Utils.timeago
Raine Virta [Mon, 2 Mar 2009 01:13:01 +0000 (03:13 +0200)] 
finnish translation for Utils.timeago

15 years agoconfig: add alias config remove
Raine Virta [Sun, 1 Mar 2009 22:27:25 +0000 (00:27 +0200)] 
config: add alias config remove

15 years agoconfig: allow multiple values in config add and rm
Raine Virta [Sat, 28 Feb 2009 00:37:27 +0000 (02:37 +0200)] 
config: allow multiple values in config add and rm

15 years agomarkov: ensure messages are cleaned before learning and replying.
Spencer Rinehart [Tue, 3 Mar 2009 12:33:17 +0000 (07:33 -0500)] 
markov: ensure messages are cleaned before learning and replying.

Lines that began with or ended with spaces were breaking the learning
thread.  The call to clean_str was moved down into learn_line (and
random_markov) so that all messages, including those being learned from
files, get cleaned.

15 years agoPO file update
Giuseppe Bilotta [Sun, 1 Mar 2009 22:52:02 +0000 (23:52 +0100)] 
PO file update

15 years agomarkov: v2 storage
Giuseppe Bilotta [Sun, 1 Mar 2009 01:08:24 +0000 (02:08 +0100)] 
markov: v2 storage

Store chains as hashes mapping symbols to weights (and their totals)

15 years agomarkov: refactor triplet learning
Giuseppe Bilotta [Sat, 28 Feb 2009 10:59:17 +0000 (11:59 +0100)] 
markov: refactor triplet learning

15 years agomarkov: refactor word picking
Giuseppe Bilotta [Sat, 28 Feb 2009 10:53:08 +0000 (11:53 +0100)] 
markov: refactor word picking

15 years agorss plugin: upper limit for watched feeds
Giuseppe Bilotta [Fri, 27 Feb 2009 20:40:16 +0000 (21:40 +0100)] 
rss plugin: upper limit for watched feeds

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.

15 years agoplugins: allow plugins whitelisting
Raine Virta [Fri, 27 Feb 2009 23:34:50 +0000 (01:34 +0200)] 
plugins: allow plugins whitelisting

If the whitelist is not empty, only load the specified plugins.

15 years agoplugins: refactor plugin scanning
Raine Virta [Fri, 27 Feb 2009 19:30:40 +0000 (21:30 +0200)] 
plugins: refactor plugin scanning

Refactor plugin scanning for cleaner distinction between core modules
and plugins.

15 years agoSeparate @dirs containing all botmodules (plugins and core modules)
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

15 years agoItalian PO update
Giuseppe Bilotta [Fri, 27 Feb 2009 21:22:48 +0000 (22:22 +0100)] 
Italian PO update

15 years agohangman: fix score fetching to work for offline users.
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.

15 years agofinnish localization for basic expressions
Raine Virta [Wed, 25 Feb 2009 23:03:52 +0000 (01:03 +0200)] 
finnish localization for basic expressions

15 years agolastfm: add venue command
Raine Virta [Wed, 25 Feb 2009 02:25:52 +0000 (04:25 +0200)] 
lastfm: add venue command

15 years agolastfm: find events by venue
Raine Virta [Wed, 25 Feb 2009 00:15:48 +0000 (02:15 +0200)] 
lastfm: find events by venue

15 years agolastfm: add method for searching venues
Raine Virta [Tue, 24 Feb 2009 23:56:05 +0000 (01:56 +0200)] 
lastfm: add method for searching venues

15 years agolastfm: show link to the user's profile in np action
Raine Virta [Tue, 24 Feb 2009 23:17:00 +0000 (01:17 +0200)] 
lastfm: show link to the user's profile in np action

15 years agolastfm: group same tracks in recent tracks
Raine Virta [Tue, 24 Feb 2009 22:46:48 +0000 (00:46 +0200)] 
lastfm: group same tracks in recent tracks

15 years agolastfm: add missing 's
Raine Virta [Tue, 24 Feb 2009 22:24:26 +0000 (00:24 +0200)] 
lastfm: add missing 's

15 years agomarkov: add config option for delay in learning thread
Raine Virta [Tue, 24 Feb 2009 21:52:31 +0000 (23:52 +0200)] 
markov: add config option for delay in learning thread

15 years agomarkov: organize help
Raine Virta [Tue, 24 Feb 2009 21:12:16 +0000 (23:12 +0200)] 
markov: organize help

15 years agomarkov: add command for learning from files
Raine Virta [Tue, 24 Feb 2009 18:51:22 +0000 (20:51 +0200)] 
markov: add command for learning from files

15 years agosearch: add command 'lucky'
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.

15 years agoseen: add part message if any
Raine Virta [Sun, 22 Feb 2009 16:39:33 +0000 (18:39 +0200)] 
seen: add part message if any

15 years agoseen: add double quotes around user written messages
Raine Virta [Sun, 22 Feb 2009 16:36:00 +0000 (18:36 +0200)] 
seen: add double quotes around user written messages

15 years agoseen: show what user said or did before leaving
Raine Virta [Sun, 22 Feb 2009 16:24:01 +0000 (18:24 +0200)] 
seen: show what user said or did before leaving

15 years agoseen: cyclically store two of the users' latest actions in the registry
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

15 years agomarkov: enable gettext for more replies
Raine Virta [Thu, 19 Feb 2009 20:48:39 +0000 (22:48 +0200)] 
markov: enable gettext for more replies

15 years agouno: Mark all uno commands replied.
Spencer Rinehart [Thu, 18 Dec 2008 20:42:13 +0000 (15:42 -0500)] 
uno: Mark all uno commands replied.

15 years agomarkov: Only work with unreplied messages.
Spencer Rinehart [Thu, 18 Dec 2008 20:41:51 +0000 (15:41 -0500)] 
markov: Only work with unreplied messages.

15 years agolastfm: catch all errors when connecting
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.

15 years agoseen: If nick doesn't match exactly, fallback to a regexp search (#19).
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).

15 years agourl: Only reply with disabled host message when url info directly requested.
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.

15 years agomarkov: try harder when generating strings
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.

15 years agomarkov: learn vs learn_line
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.

15 years agoregistry: expose set and bulk parameters
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.

15 years agoregistry: spare useless I/O
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).

15 years agoremove whitespace
Raine Virta [Thu, 19 Feb 2009 14:26:34 +0000 (16:26 +0200)] 
remove whitespace

15 years agolastfm: require num parameter for lastfm action to be an integer
Raine Virta [Thu, 19 Feb 2009 01:49:08 +0000 (03:49 +0200)] 
lastfm: require num parameter for lastfm action to be an integer

15 years agolastfm: make "tracks" optional in mappings for lovedtracks and recenttracks
Raine Virta [Thu, 19 Feb 2009 01:45:52 +0000 (03:45 +0200)] 
lastfm: make "tracks" optional in mappings for lovedtracks and recenttracks

15 years agolastfm: fix misplaced parenthesis in output
Raine Virta [Thu, 19 Feb 2009 01:40:26 +0000 (03:40 +0200)] 
lastfm: fix misplaced parenthesis in output

15 years agolastfm: update help
Raine Virta [Thu, 19 Feb 2009 01:38:16 +0000 (03:38 +0200)] 
lastfm: update help

15 years agogooglefight plugin
Raine Virta [Wed, 4 Feb 2009 14:07:37 +0000 (16:07 +0200)] 
googlefight plugin

15 years agotranslator: fix BabelfishTranslator
Raine Virta [Tue, 17 Feb 2009 17:26:49 +0000 (19:26 +0200)] 
translator: fix BabelfishTranslator

15 years agotranslator: fix NiftyTranslator
Raine Virta [Tue, 17 Feb 2009 16:12:27 +0000 (18:12 +0200)] 
translator: fix NiftyTranslator

15 years agotranslator: use *_with(:attribute => value) syntax to find elements
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.

15 years agotranslator: update GoogleTranslator for changes in their web interface
Raine Virta [Tue, 17 Feb 2009 01:59:24 +0000 (03:59 +0200)] 
translator: update GoogleTranslator for changes in their web interface

15 years agolast.fm plugin: list top tags and similar artists in artist info
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

15 years agoircbot: fix nil error variable on ServerError
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.

15 years agofactoids: pass proper parameter from unreplied()
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.

15 years agolastfm: put URL in artist summary
Giuseppe Bilotta [Mon, 16 Feb 2009 21:34:23 +0000 (22:34 +0100)] 
lastfm: put URL in artist summary

15 years agolastfm: say something when user top/weekly chart is empty
Giuseppe Bilotta [Mon, 16 Feb 2009 21:05:35 +0000 (22:05 +0100)] 
lastfm: say something when user top/weekly chart is empty

15 years agolastfm: limits to user data output
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).

15 years agolast.fm plugin: rewrote the user-related info retrieval action to API 2.0
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