--[[ cmd_killscripts.lua v0.02 by blastbeat - this script adds a command "killscripts" to kill all scripts - usage: [+!#]killscripts - changelog 0.02: - updated script api ]]-- --// settings begin //-- local permission = { -- who is allowed to use this command? [ 0 ] = false, -- unreg [ 10 ] = false, -- guest [ 20 ] = false, -- reg [ 30 ] = false, -- vip [ 40 ] = false, -- svip [ 60 ] = false, -- operator [ 80 ] = false, -- admin [ 100 ] = true, -- hubowner } local msg_denied = "You are not allowed to use this command." local msg_ok = "Killed scripts. Have fun =)" local cmd = "killscripts" --// settings end //-- local utf_match = utf.match hub:setListener( "onStart", { }, function( ) local help = hub.import "cmd_help" if help then help.reg( "killscripts", "[+!#]killscripts", "kills all scripts (and makes your hub unusable)", 100 ) end return nil end ) hub:setListener( "onBroadcast", { }, function( user, adccmd, txt ) local command = utf_match( txt, "^[+!#](%a+)" ) if command == cmd then if not permission[ user:getLevel( ) ] then user:reply( msg_denied, hub.getbot( ) ) return PROCESSED end hub.killscripts( ) user:reply( msg_ok, hub.getbot( ) ) return PROCESSED end return nil end ) hub.debug( "** Loaded cmd_killscripts.lua **" )