97 end); |
97 end); |
98 link = self.links:format(link); |
98 link = self.links:format(link); |
99 match = match:gsub("%. ", ".\n", 1); -- Add a newline between title and authors |
99 match = match:gsub("%. ", ".\n", 1); -- Add a newline between title and authors |
100 if count > 1 then link = link .. " (" .. count .. " more matches)" end |
100 if count > 1 then link = link .. " (" .. count .. " more matches)" end |
101 cb(match .. "\n" .. link); |
101 cb(match .. "\n" .. link); |
|
102 elseif number then |
|
103 cb("Sorry, no match, try " .. self.links:format(number)); |
102 else |
104 else |
103 cb("Sorry, no match"); |
105 cb("Sorry, no match"); |
104 end |
106 end |
105 end |
107 end |
106 |
108 |