Changeset

10145:0fcd251a27e5

prosodyctl: Added missing semicolons to some return calls
author João Duarte <jvsDuarte08@gmail.com>
date Wed, 17 Jul 2019 09:12:32 -0700
parents 10144:48a62e2e2a63
children 10146:903db0fcb716
files prosodyctl
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Wed Jul 17 09:03:15 2019 -0700
+++ b/prosodyctl	Wed Jul 17 09:12:32 2019 -0700
@@ -88,7 +88,7 @@
 function commands.get_modules(arg)
   if arg[1] == "--help" then
 		show_usage([[get_modules]], [[Downloads all available modules]]);
-    return 1
+    return 1;
   end
   if os.execute '[ -e "./downloaded_modules" ]' then
     print("The modules have already been imported")
@@ -100,16 +100,16 @@
       print("Downloading plugins")
       os.execute("hg clone https://hg.prosody.im/prosody-modules/ downloaded_modules")
       print("Done!")
-      return 0
+      return 0;
     else
       print("We keep what we have then!")
-      return 0
+      return 0;
     end
   else
     print("Getting all the available modules")
     os.execute("hg clone https://hg.prosody.im/prosody-modules/ downloaded_modules")
     print("Done!")
-    return 0
+    return 0;
   end
 end
 
@@ -119,14 +119,14 @@
 function commands.write_rockspec(arg)
   if arg[1] == "--help" then
     show_usage([[write_rockspec]], [[Picks up a module and writes an initial rockspec]]);
-    return 1
+    return 1;
   end
   print("Writing rockspec for "..arg[1])
   os.execute("luarocks write_rockspec "..arg[1].." ./downloaded_modules/"..arg[1])
   print("Rockspec created! Moving it into the ./downloaded_modules/"..arg[1].." folder")
   os.execute("mv "..arg[1].."-scm-1.rockspec ./downloaded_modules/"..arg[1])
   print("Done!")
-  return 0
+  return 0;
 end
 
 -- Command to install a rockspec with local sources
@@ -134,10 +134,10 @@
 function commands.make(arg)
   if arg[1] == "--help" then
     show_usage([[make]], [[Installs a module with sources available locally]]);
-    return 1
+    return 1;
   end
   os.execute("cd downloaded_modules/"..arg[1].." && luarocks --tree='../../plugins' make "..arg[1].."-scm-1.rockspec")
-  return 0
+  return 0;
 end
 
 -- Command to remove a rockspec
@@ -145,7 +145,7 @@
 function commands.remove(arg)
   if arg[1] == "--help" then
     show_usage([[make]], [[Removes a module installed in the wroking directory's plugins folder]]);
-    return 1
+    return 1;
   end
   local flag = "--tree="
   -- I'm considering the flag is the first, but there can be many flags
@@ -159,14 +159,14 @@
     print("Removing "..arg[1].." from ./plugins")
     os.execute("luarocks --tree='"..prosody.paths.plugins.."' remove "..arg[1])
     print("Done!")
-    return 0
+    return 0;
   end
 end
 
 function commands.install(arg)
   if arg[1] == "--help" then
     show_usage([[make]], [[Installs a rockspec/rock from a specified server]]);
-    return 1
+    return 1;
   end
   -- Need to think about the case with many flags
   local flag = "--tree="
@@ -180,7 +180,7 @@
   else
     print("Installing module "..arg[1].." locally, from luarocks repo")
     os.execute("luarocks --tree='"..prosody.paths.plugins.."' install "..arg[1])
-    return 0
+    return 0;
   end
 end
 
@@ -219,7 +219,7 @@
     return 1;
 	end
 	for module in modulemanager.get_modules_for_host() do
-		show_warning("%s", module)
+		show_warning("%s", module)  
 	end
 end
 
@@ -241,7 +241,7 @@
         end
     end
     pfile:close()
-    return 0
+    return 0;
 end
 
 function commands.adduser(arg)