plugins.ietf: Include a link in reply if an RFC number was given but no match found

Sat, 23 Jan 2016 15:16:36 +0100

author
Kim Alvefur <zash@zash.se>
date
Sat, 23 Jan 2016 15:16:36 +0100
changeset 135
87e58c58a08d
parent 134
2c49724e0cca
child 136
e36f5d359aa5

plugins.ietf: Include a link in reply if an RFC number was given but no match found

plugins/ietf.lua file | annotate | diff | comparison | revisions
--- a/plugins/ietf.lua	Tue Jan 12 22:28:31 2016 +0100
+++ b/plugins/ietf.lua	Sat Jan 23 15:16:36 2016 +0100
@@ -99,6 +99,8 @@
 		match = match:gsub("%. ", ".\n", 1); -- Add a newline between title and authors
 		if count > 1 then link = link .. " (" .. count .. " more matches)" end
 		cb(match .. "\n" .. link);
+	elseif number then
+		cb("Sorry, no match, try " .. self.links:format(number));
 	else
 		cb("Sorry, no match");
 	end

mercurial