diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-03-07 11:22:27 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-03-07 11:29:45 +0100 |
commit | c3d268f88acfa1ebabacc79258e87ffe767d0624 (patch) | |
tree | 71805f0e676bf3b0dacae5fc3440c77b992d2e4f /data | |
parent | a1bb375a1972dcf33a4c391852504e7bdb27889f (diff) |
lastfm: refactor map options for events search
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/lastfm.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index 6e899c1a..17107fc1 100644 --- a/data/rbot/plugins/lastfm.rb +++ b/data/rbot/plugins/lastfm.rb @@ -755,11 +755,17 @@ class LastFmPlugin < Plugin end end +event_map_options = { + :action => :find_events, + :requirements => { :num => /\d+/ }, + :thread => true +} + plugin = LastFmPlugin.new -plugin.map 'lastfm [:num] event[s] in *location [sort[ed] by :sort_by] [in] [:sort_order] [order]', :action => :find_events, :requirements => { :num => /\d+/ }, :thread => true -plugin.map 'lastfm [:num] event[s] by *who [sort[ed] by :sort_by] [in] [:sort_order] [order]', :action => :find_events, :requirements => { :num => /\d+/ }, :thread => true -plugin.map 'lastfm [:num] event[s] at *venue [sort[ed] by :sort_by] [in] [:sort_order] [order]', :action => :find_events, :requirements => { :num => /\d+/ }, :thread => true -plugin.map 'lastfm [:num] event[s] [for] *who [sort[ed] by :sort_by] [in] [:sort_order] [order]', :action => :find_events, :requirements => { :num => /\d+/ }, :thread => true +plugin.map 'lastfm [:num] event[s] in *location [sort[ed] by :sort_by] [in] [:sort_order] [order]', event_map_options.dup +plugin.map 'lastfm [:num] event[s] by *who [sort[ed] by :sort_by] [in] [:sort_order] [order]', event_map_options.dup +plugin.map 'lastfm [:num] event[s] at *venue [sort[ed] by :sort_by] [in] [:sort_order] [order]', event_map_options.dup +plugin.map 'lastfm [:num] event[s] [for] *who [sort[ed] by :sort_by] [in] [:sort_order] [order]', event_map_options.dup plugin.map 'lastfm artist *artist', :action => :find_artist, :thread => true plugin.map 'lastfm album *album [by *artist]', :action => :find_album plugin.map 'lastfm track *track', :action => :find_track, :thread => true |