]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
last.fm plugin: removed redundant mappings
authorRaine Virta <rane@kapsi.fi>
Sat, 14 Feb 2009 21:53:45 +0000 (23:53 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 14 Feb 2009 21:59:34 +0000 (22:59 +0100)
data/rbot/plugins/lastfm.rb

index 7fc256a549dfe3f23c9a6692f28e3ad47293e7bd..030c5e07622358ddc77773a62fed8f7050ef9cce 100644 (file)
@@ -399,18 +399,14 @@ plugin = LastFmPlugin.new
 plugin.map 'lastfm [:num] event[s] in *location', :action => :find_events, :requirements => { :num => /\d+/ }, :thread => true
 plugin.map 'lastfm [:num] event[s] by *who', :action => :find_events, :requirements => { :num => /\d+/ }, :thread => true
 plugin.map 'lastfm [:num] event[s] [for] *who', :action => :find_events, :requirements => { :num => /\d+/ }, :thread => true
-plugin.map 'lastfm now :who', :action => :now_playing, :thread => true
-plugin.map 'lastfm now', :action => :now_playing, :thread => true
+plugin.map 'lastfm [now] [:who]', :action => :now_playing, :thread => true
 plugin.map 'np :who', :action => :now_playing, :thread => true
 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
-plugin.map 'lastfm set nick :who', :action => :set_user, :thread => true
-plugin.map 'lastfm set user :who', :action => :set_user, :thread => true
-plugin.map 'lastfm set username :who', :action => :set_user, :thread => true
+plugin.map 'lastfm set user[name] :who', :action => :set_user, :thread => true
 plugin.map 'lastfm set verb *present, *past', :action => :set_verb, :thread => true
-plugin.map 'lastfm who :who', :action => :get_user, :thread => true
-plugin.map 'lastfm who', :action => :get_user, :thread => true
+plugin.map 'lastfm who [:who]', :action => :get_user, :thread => true
 plugin.map 'lastfm compare to :user2', :action => :tasteometer, :thread => true
 plugin.map 'lastfm compare [:user1] [to] :user2', :action => :tasteometer, :thread => true
 plugin.map 'np', :action => :now_playing, :thread => true
@@ -418,4 +414,3 @@ plugin.map "lastfm [user] :action [:user]", :thread => true,
   :requirements => { :action =>
     /^(?:events|friends|neighbou?rs|playlists|recent?tracks|top(?:album|artist|tag)s?|weekly(?:album|artist|track)chart|weeklychartlist)$/
 }
-plugin.map "lastfm [:who]", :action => :now_playing, :thread => true