Luadch Mem Script

Post finished Hubside Scripts here, known supporting hubsofts for LUA scripting.

ADCH++ | DCWatch | LUADCH
Post Reply
Toast

Luadch Mem Script

Post by Toast » 02 Jan 2009, 15:42

Code: Select all

--// settings begin //--

local scriptname = "cmd_mem"

local cmd = "mem"

--// settings end //--

local hubcmd

local onbmsg = function( user, command, parameters, txt )
    local a = ( collectgarbage "count" ) / 1024
    collectgarbage( )
    local b = ( collectgarbage "count" ) / 1024
    user:reply( "Speicher: " .. a .. " / " .. b )
    return PROCESSED
end

hub.setlistener( "onStart", { },
    function( )
        hubcmd = hub.import "etc_hubcommands"    -- add hubcommand
        assert( hubcmd )
        assert( hubcmd.add( cmd, onbmsg ) )
        return nil
    end
)

hub.debug( "** Loaded " .. scriptname .. ".lua **" )

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests