Small update to dict command
authorMikael Berthe <mikael@lilotux.net>
Tue, 13 Apr 2010 20:34:59 +0200
changeset 2 c7ac7b6a76e0
parent 1 cca972635e5e
child 3 508108deee63
Small update to dict command
mcbot/cmds/dict.lua
--- a/mcbot/cmds/dict.lua	Sun Apr 11 22:03:12 2010 +0200
+++ b/mcbot/cmds/dict.lua	Tue Apr 13 20:34:59 2010 +0200
@@ -14,7 +14,8 @@
     -- Sometimes dict outpur is ugly... Let's filter out whitespace.
     result = result:gsub("[ \t]+\n", "\n"):gsub("\n\n\n+", "\n\n")
     -- Trim trailing newlines
-    return result:gsub("\n+$", "")
+    result = result:gsub("\n+$", "")
+    return result
 end
 
 mcbot_register_command("dict", dict)