summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorRaine Virta <rane@kapsi.fi>2009-02-19 03:49:08 +0200
committerRaine Virta <rane@kapsi.fi>2009-02-19 03:54:35 +0200
commitff452ad1bf111025f0661274ac7fb8b2f769a293 (patch)
treec9fca18e88a47c5f39748293a5d95a7e5c378ba4 /data
parenta8c44e2aaf451bf7ecae317b9b75d86f770413fc (diff)
lastfm: require num parameter for lastfm action to be an integer
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/lastfm.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb
index 811a63aa..9be57d16 100644
--- a/data/rbot/plugins/lastfm.rb
+++ b/data/rbot/plugins/lastfm.rb
@@ -620,13 +620,15 @@ 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 "lastfm [user] [:num] :action [:user]", :thread => true,
- :requirements => { :action =>
- /^(?:events|shouts|friends|neighbou?rs|loved(?:tracks)?|recent(?:t?racks)?|top(?:album|artist|track)s?|weekly(?:albums?|artists?|tracks?)(?:chart)?)$/
+ :requirements => {
+ :action => /^(?:events|shouts|friends|neighbou?rs|loved(?:tracks)?|recent(?:t?racks)?|top(?:album|artist|track)s?|weekly(?:albums?|artists?|tracks?)(?:chart)?)$/,
+ :num => /^\d+$/
}
plugin.map 'lastfm [user] [:num] :action [:user] over [*period]', :thread => true,
:requirements => {
:action => /^(?:top(?:album|artist|track)s?)$/,
- :period => /^(?:(?:3|6|12) months)|(?:a\s|1\s)?year$/
+ :period => /^(?:(?:3|6|12) months)|(?:a\s|1\s)?year$/,
+ :num => /^\d+$/
}
plugin.map 'lastfm [now] [:who]', :action => :now_playing, :thread => true
plugin.map 'np [:who]', :action => :now_playing, :thread => true