]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/lastfm.rb
reaction: spoken reactions should use plainreply, not reply
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / lastfm.rb
index 17107fc1f512cc3eac09063195f7b67a9bbebb5a..22bd113051f20c8878c1682ffb28d04f1e24bb0c 100644 (file)
@@ -757,15 +757,18 @@ end
 
 event_map_options = {
  :action => :find_events,
- :requirements => { :num => /\d+/ },
+ :requirements => {
+  :num => /\d+/,
+  :sort_order => /(?:asc|desc)(?:ending)?/
+ },
  :thread => true
 }
 
 plugin = LastFmPlugin.new
-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 [: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