franz [Mon, 29 Jun 2009 06:26:46 +0000 (08:26 +0200)]
gettext: fix empty LANGUAGE env var
When LANGUAGE env var is set to empty value, it breaks
gettext in ruby, so we unset it if it's empty.
franz [Sun, 28 Jun 2009 21:14:39 +0000 (23:14 +0200)]
ruby 1.9: fix *methods.include?
Since in 1.9 methods arrays have symbols instead of strings, fix it by
changing into respond_to? and method_defined?
franz [Mon, 15 Jun 2009 20:07:45 +0000 (22:07 +0200)]
ruby 1.9: disable the Singleton monkeypatch for 1.9
this monkeypatch doesn't work on 1.9 - Singleton has no _load method
franz [Mon, 15 Jun 2009 19:59:56 +0000 (21:59 +0200)]
ruby 1.9: monkeypatch MonitorMixin and ConditionVariable
ruby 1.9's ConditionVariable#wait is not implemented for timeout != nil,
this patch adds an implementation for it (see ruby-core:15847)
Also, since MonitorMixin is included into TCPSocket in rbot, and
TCPSocket#send != Object#send in ruby 1.9, i changed that to use
__send__.
franz [Mon, 15 Jun 2009 19:27:41 +0000 (21:27 +0200)]
ruby 1.9: fix Integer(nil)
in 1.9, Integer(nil) raises TypeError, so we change "%d" to "%s"
franz [Mon, 15 Jun 2009 19:07:35 +0000 (21:07 +0200)]
ruby 1.9: convert Exception to string explicitly
changed "string + exception" to "string #{e}", the
former yields 'can't convert <e> into String' in ruby 1.9
franz [Mon, 15 Jun 2009 19:06:56 +0000 (21:06 +0200)]
ircbot: fix indentation error
franz [Mon, 15 Jun 2009 18:53:00 +0000 (20:53 +0200)]
ruby 1.9: get rid of colons in case statements
ruby 1.9 doesn't support colon as delimiter after when expression,
so we use newline as delimiter.
franz [Mon, 15 Jun 2009 18:41:01 +0000 (20:41 +0200)]
ruby 1.9: get rid of Array#nitems
Array#nitems is gone in ruby 1.9, changed rbot code to use
Array.compact.size, which works in both 1.8 & 1.9
Giuseppe Bilotta [Wed, 26 Aug 2009 18:52:31 +0000 (20:52 +0200)]
Utils: time parsing routines
Add time parsing routines to Utils, to be used for human-to-computer
conversion of time offsets. Refactored and enhanced from the remind
plugin.
Giuseppe Bilotta [Sun, 16 Aug 2009 14:05:33 +0000 (16:05 +0200)]
Suppress warnings about unitialized variables
hangman: an unneeded letters accessor was defined
ircbot: restore initializations removed by previous commit
Giuseppe Bilotta [Fri, 14 Aug 2009 12:49:42 +0000 (14:49 +0200)]
ircbot: clean up ping timings on connect
Giuseppe Bilotta [Thu, 13 Aug 2009 00:35:55 +0000 (02:35 +0200)]
nickserv: add 'ghosted' to nickserv.nick_avail
Giuseppe Bilotta [Thu, 13 Aug 2009 00:17:15 +0000 (02:17 +0200)]
basics: UI reconnect command
Giuseppe Bilotta [Fri, 7 Aug 2009 23:40:18 +0000 (01:40 +0200)]
Better handling of MessageMapper failures
The plugin fallback method is now passed the list of failures.
Failures themselves are encapsulated in their own data type, making it
easier to handle failures that should inform the user with something
more detailed than the classic 'usage' pattern.
It's still up to the fallback method to make use (e.g. echo) the
relevant messages.
Giuseppe Bilotta [Mon, 29 Jun 2009 22:41:58 +0000 (00:41 +0200)]
extends: bring conjoin to Enumerable
Put #conjoin() in the Enumerable module, so that it can be shared by all
enumerables (e.g. ranges). Since #size() is not necessarily present, its
use is replaced by #count(), the result of which is cached because
it can be slow on objects missing #size().
Adam James [Tue, 16 Jun 2009 22:27:50 +0000 (23:27 +0100)]
core/utils/extends.rb: add #conjoin for Array
Adam James [Tue, 16 Jun 2009 22:27:03 +0000 (23:27 +0100)]
lib/rbot/plugins.rb: remove executable bit
Giuseppe Bilotta [Fri, 12 Jun 2009 08:20:01 +0000 (10:20 +0200)]
search: Google changed their WAP address
dmitry kim [Sat, 6 Jun 2009 13:44:13 +0000 (17:44 +0400)]
* (gettext) relaxed check for bound_target() existance
dmitry kim [Sat, 6 Jun 2009 12:34:53 +0000 (16:34 +0400)]
* (plugins) note: misc cleanups
dmitry kim [Sat, 6 Jun 2009 12:08:30 +0000 (16:08 +0400)]
+ (plugins) note
Giuseppe Bilotta [Mon, 1 Jun 2009 22:41:56 +0000 (00:41 +0200)]
rss plugin: categories fix
Don't break when the feed doesn't define categories.
Giuseppe Bilotta [Sun, 24 May 2009 11:49:38 +0000 (13:49 +0200)]
seen plugin: check if there's a previous action before using it
If the registry data is not an Array, there will be no 'before'
information stored, so just use the normal output.
Giuseppe Bilotta [Fri, 22 May 2009 15:52:34 +0000 (17:52 +0200)]
factoids: fix error message when no fact is found
When the search is called as 'facts search' the 'words' parameter is
not defined, so customize the message depending on wether we have that
or 'rx'.
David Gadling [Thu, 21 May 2009 18:53:19 +0000 (11:53 -0700)]
multiple plugins: Changes to remove parenthesize warnings.
All of these modules/plugins were generating warnings like this:
warning: parenthesize argument(s) for future version
This patch should fix all the warnings without affecting functionality.
Giuseppe Bilotta [Wed, 20 May 2009 12:44:53 +0000 (14:44 +0200)]
search: gtime instead of time
The time command is already defined by the corresponding plugin, so use
gtime (like gdef and gcalc) for the Google clock.
David Gadling [Mon, 30 Mar 2009 18:43:24 +0000 (11:43 -0700)]
search: Added a time command that gets the time from Google. !time london
David Gadling [Tue, 5 May 2009 21:57:13 +0000 (14:57 -0700)]
quiz: Make maximum number of jokers configurable.
David Gadling [Mon, 18 May 2009 22:40:38 +0000 (15:40 -0700)]
youtube: fixes for older XML parsers
REXML in (at least) Ruby 1.8.6 doesn't support the @attr xpath to get
an attribute value. Use the slightly more verbose way of doing it.
Giuseppe Bilotta [Sat, 16 May 2009 13:59:28 +0000 (15:59 +0200)]
rss plugin: categories
Some feeds have more than one category. Make all of them available in
the :categories stream key.
Giuseppe Bilotta [Mon, 11 May 2009 14:20:18 +0000 (16:20 +0200)]
quiz plugin: simplify local file loading
Giuseppe Bilotta [Wed, 6 May 2009 15:48:22 +0000 (17:48 +0200)]
ircbot: reinstante @bot.channels
When the new IRC framework was introduced, the old @channels Hash and
its accessor for @bot were dismissed.
Reintroduce it for backwards compatibility.
Raine Virta [Wed, 29 Apr 2009 22:35:28 +0000 (01:35 +0300)]
translator: fix sentences not working with omitted language parameters
Raine Virta [Wed, 29 Apr 2009 21:53:57 +0000 (00:53 +0300)]
translator: replace underscores with spaces when showing the translator
Because "provided by google_translate" is ugly.
Raine Virta [Wed, 29 Apr 2009 21:52:41 +0000 (00:52 +0300)]
remove fish.rb and map translate in translator.rb
Translator plugin supports babelfish, and getting rid of this plugin
allows us to use ´translate´ command for better purposes.
Raine Virta [Wed, 29 Apr 2009 21:47:12 +0000 (00:47 +0300)]
translator: make source language optional
In which case we use Google translate's source language auto-detection feature.
Raine Virta [Wed, 29 Apr 2009 21:40:54 +0000 (00:40 +0300)]
translator: make destination language optional
Raine Virta [Sun, 5 Apr 2009 20:55:21 +0000 (23:55 +0300)]
greet plugin
Giuseppe Bilotta [Mon, 20 Apr 2009 18:48:07 +0000 (20:48 +0200)]
gettext: support version 2
GetText version 2 has some significant difference from earlier version.
* different syntax to set the default locale path
* different syntax to set non-cached mode
* different way to handle bound targets
Most of the changes are relative to significant functionality split
between the GetText submodules (LocalePath, TextDomain etc), so most of
the changes are just a matter of moving the defines where appropriate.
The bound_targets patch needed to cope with anonymous modules is not
needed with gettext >= 2.0.0
Giuseppe Bilotta [Mon, 20 Apr 2009 20:17:03 +0000 (22:17 +0200)]
rss: minor comment fix
Giuseppe Bilotta [Sat, 11 Apr 2009 10:41:45 +0000 (12:41 +0200)]
figlet: use Utils.try_exec instead of !!$?
The !!$? method fails because !!$? is true unless $? is nil, whereas we
want to test for a successful exit.
Giuseppe Bilotta [Sat, 11 Apr 2009 10:38:58 +0000 (12:38 +0200)]
utils: Utils.try_exec
An auxiliary method to test-run external programs and see if they run
without problem
Giuseppe Bilotta [Thu, 9 Apr 2009 15:23:55 +0000 (17:23 +0200)]
utils: fix safe_exec failures
safe_exec should be less verbose when reporting problems, since the
output might end up on IRC, and it should return a non-zero error code
when failing, so that $? get set correctly.
Giuseppe Bilotta [Sat, 11 Apr 2009 09:37:12 +0000 (11:37 +0200)]
man pages
Courtesy of Debian maintainer Marc Dequènes (Duck) <duck@duckcorp.org>
Giuseppe Bilotta [Sat, 11 Apr 2009 08:57:25 +0000 (10:57 +0200)]
karma: prevent users from changing own karma
Giuseppe Bilotta [Wed, 8 Apr 2009 10:33:40 +0000 (12:33 +0200)]
quotes: listquotes command
Giuseppe Bilotta [Tue, 7 Apr 2009 18:15:17 +0000 (20:15 +0200)]
* typo in italian lart
Giuseppe Bilotta [Tue, 7 Apr 2009 12:23:22 +0000 (14:23 +0200)]
reaction: document 'reaction move' syntax
Raine Virta [Sat, 4 Apr 2009 17:17:13 +0000 (20:17 +0300)]
hone the finnish translation for seen plugin a bit
Giuseppe Bilotta [Thu, 2 Apr 2009 14:12:51 +0000 (16:12 +0200)]
imdb: fix for missing director
Director information was missing because IMDB had changed its 'info' div
box to include an id. Cope with it.
Giuseppe Bilotta [Wed, 25 Mar 2009 22:31:14 +0000 (23:31 +0100)]
messagemapper: include defaults in options
This change allows the use of :defaults in maps to define values for
parameters which are not actually present in the map itself.
We also move the initialization further down, to skip it in case of
early returns.
Giuseppe Bilotta [Tue, 24 Mar 2009 10:47:31 +0000 (11:47 +0100)]
factoids: fix 'facts search'
Giuseppe Bilotta [Sat, 21 Mar 2009 23:47:36 +0000 (00:47 +0100)]
Separate gemspec from Rakefile
The benefit of this separation is that hosting services such as GitHub
will automatically build a gem every time the version in the spec is
changed. The underside of this separation is that hosting services such
as GitHub will automatically build a gem every time the version is
changed.
To allow the automatic gem generation to trigger on the release of
0.9.15, we demoted the version in the spec to 0.9.14. This gimmick is
needed because the gem spec doesn't allow non-numeric versions.
Since the gemspec is now standalone, it uses Dir instead of FileList,
which is equivalent for our use case. Moreover, the Rakefile only
defines the gem tasks if the spec is present.
Giuseppe Bilotta [Fri, 20 Mar 2009 22:29:25 +0000 (23:29 +0100)]
search: fix gcalc regexp again
Giuseppe Bilotta [Fri, 20 Mar 2009 15:01:45 +0000 (16:01 +0100)]
BIG PO file update
Giuseppe Bilotta [Fri, 20 Mar 2009 15:02:43 +0000 (16:02 +0100)]
seen: keep nick in ACTION message
Raine Virta [Fri, 6 Mar 2009 00:36:49 +0000 (02:36 +0200)]
finnish translation for seen plugin
Raine Virta [Fri, 6 Mar 2009 00:28:11 +0000 (02:28 +0200)]
seen: change format of ACTIONs
Raine Virta [Fri, 6 Mar 2009 00:26:14 +0000 (02:26 +0200)]
seen: use gettext
Giuseppe Bilotta [Sun, 15 Mar 2009 23:58:55 +0000 (00:58 +0100)]
Rakefile: package launch_here.rb too
And clean up some Rakefile crud while we're at it
Giuseppe Bilotta [Sun, 15 Mar 2009 23:49:31 +0000 (00:49 +0100)]
rss: whitespace fix for handle_wrap
Giuseppe Bilotta [Sun, 15 Mar 2009 12:48:45 +0000 (13:48 +0100)]
url: load filters, defaulting to the htmlinfo filter group
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.
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.
Giuseppe Bilotta [Sun, 15 Mar 2009 10:26:40 +0000 (11:26 +0100)]
rss: refactor item date generation
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.
Giuseppe Bilotta [Sun, 15 Mar 2009 09:42:36 +0000 (10:42 +0100)]
rss: clean up options parsing in printFormattedRss
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.
Giuseppe Bilotta [Fri, 13 Mar 2009 21:54:05 +0000 (22:54 +0100)]
filters: BotModule user filter loading
Giuseppe Bilotta [Wed, 11 Mar 2009 18:56:56 +0000 (19:56 +0100)]
rss: more detailed forum type
Raine Virta [Fri, 6 Mar 2009 00:25:40 +0000 (02:25 +0200)]
update finnish translation for lastfm
Raine Virta [Thu, 5 Mar 2009 22:23:12 +0000 (00:23 +0200)]
lastfm: allow bolding in translations in nowplaying
Raine Virta [Thu, 5 Mar 2009 21:25:54 +0000 (23:25 +0200)]
fix finnish translation for lastfm
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
Raine Virta [Thu, 5 Mar 2009 18:00:36 +0000 (20:00 +0200)]
url: allow ignoring urls from specific users
Raine Virta [Wed, 4 Mar 2009 23:49:39 +0000 (01:49 +0200)]
update finnish translation for lastfm
Giuseppe Bilotta [Mon, 9 Mar 2009 21:16:51 +0000 (22:16 +0100)]
reaction: spoken reactions should use plainreply, not reply
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.
Giuseppe Bilotta [Sun, 8 Mar 2009 19:38:47 +0000 (20:38 +0100)]
youtube: fix video page detection in htmlfilter
Giuseppe Bilotta [Sat, 7 Mar 2009 23:07:05 +0000 (00:07 +0100)]
keywords plugin: document some more features in help
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.
Giuseppe Bilotta [Sat, 7 Mar 2009 11:20:22 +0000 (12:20 +0100)]
hangman: space scores
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.
Giuseppe Bilotta [Sat, 7 Mar 2009 10:22:27 +0000 (11:22 +0100)]
lastfm: refactor map options for events search
Giuseppe Bilotta [Sat, 7 Mar 2009 10:21:10 +0000 (11:21 +0100)]
lastfm: handle network errors when looking for events by venue
Giuseppe Bilotta [Sat, 7 Mar 2009 10:10:05 +0000 (11:10 +0100)]
lastfm: handle no events when searching by venue
Giuseppe Bilotta [Sat, 7 Mar 2009 10:03:34 +0000 (11:03 +0100)]
lastfm: handle venue not found
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.
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.
Giuseppe Bilotta [Thu, 5 Mar 2009 18:03:20 +0000 (19:03 +0100)]
lastfm: allow both 'sort by' and 'sorted by'
Raine Virta [Wed, 4 Mar 2009 23:49:39 +0000 (01:49 +0200)]
update finnish translation for lastfm
Raine Virta [Wed, 4 Mar 2009 23:35:00 +0000 (01:35 +0200)]
lastfm: mention "events at <venue>" in the help
Raine Virta [Wed, 4 Mar 2009 23:31:46 +0000 (01:31 +0200)]
lastfm: event sorting
Raine Virta [Wed, 4 Mar 2009 19:22:59 +0000 (21:22 +0200)]
update finnish lastfm translation
Raine Virta [Wed, 4 Mar 2009 19:20:45 +0000 (21:20 +0200)]
lastfm: use gettext in album format
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
Raine Virta [Tue, 3 Mar 2009 06:54:14 +0000 (08:54 +0200)]
finnish translation for Utils.comma_list
Raine Virta [Tue, 3 Mar 2009 06:45:30 +0000 (08:45 +0200)]
lastfm: use Utils.comma_list in appropriate places
Raine Virta [Tue, 3 Mar 2009 06:44:20 +0000 (08:44 +0200)]
utils: add a helper method for creating comma separated lists