]> git.lizzy.rs Git - elidragon.git/blobdiff - commands.lua
Merge pull request #4 from HimbeerserverDE/master
[elidragon.git] / commands.lua
index dafa319c5346a7a732bd8c68305d9d440cda8d08..1c2f7a0f4a39ff0a5384d7480b641d5abfa4661e 100755 (executable)
@@ -1,11 +1,3 @@
-minetest.register_chatcommand("setnews", {
-       params = "<news>",
-       description = "Set news",
-       privs = {server = true},
-       func = function(player, param)
-               elidragon.savedata.news = param
-       end,
-})
 minetest.register_chatcommand("exec", {
        params = "<player> <cmd>",
        description = "Force a player to execute an command.",
@@ -34,7 +26,7 @@ minetest.register_chatcommand("message", {
 })
 minetest.register_chatcommand("colormsg", {
        params = "[[<player>-]color>-]<message>",
-       description = "Send a message as the server. [deprecated, replaced my the message command]",
+       description = "Send a message as the server. [deprecated, replaced by the message command]",
        privs = {server = true},
        func = function(name, param)
         elidragon.message(param)
@@ -72,10 +64,9 @@ minetest.register_chatcommand("sudo", {
        func = function(name, param)
                local target = param:split(" ")[1]
                local command = param:split(" ")[2]
-               local arguments
                local argumentsdisp
                local cmddef = minetest.chatcommands
-               _, _, arguments = string.match(param, "([^ ]+) ([^ ]+) (.+)")
+               local _, _, arguments = string.match(param, "([^ ]+) ([^ ]+) (.+)")
                if not arguments then arguments = "" end
                if target and command then
                        if cmddef[command] then