-- Show scripts
-- Made by Madman
-- A simple script to show what scripts are in the Scripts folder
Bot = frmHub:GetHubBotName()
function ChatArrival(curUser, data)
local data = string.sub(data, 1, -2)
local s,e,cmd = string.find(data, "%b<>%s+[%!%+%?%#](%S+)")
if cmd then
local tCmds = {
["listscripts"] = function (curUser, data)
if curUser.bOperator then
os.execute("dir *.lua /b > Scripts.ini")
local list = io.open("Scripts.ini")
if list then
curUser:SendData(Bot, "The hub currently has these scripts in the scripts folder")
for Scripts in io.lines("Scripts.ini") do
curUser:SendData(Scripts)
end
list:close()
os.remove("Scripts.ini")
end
return 1
end
curUser:SendData(Bot, "Hmmm.. nope.. You ain't allowed to list the scripts") return 1
end,
}
if tCmds[cmd] then
return tCmds[cmd](curUser, data)
end
end
end
A simple script to show what scripts are in the Scripts folder... =)
Perfect!
Nice Script.
Useful.
Thks
hi, can u make versio where only master profile can see the script what are running.
QuoteOriginally posted by Mutor
change the line
if cmd then
to
if cmd and user.iProfile == 0 then
Understand this script, doesnt reflect what scripts are running, just what scripts are in the scripts folder.
wrong line m8 ;) no need to change that one...
Change this instead
if curUser.bOperator then
to
if curUser.iProfile == 1 then
gr8 script but Is it possible to enable and disable scripts
when I am not hosting hub of course but I am master...
Regards,
yep
How can I enable and disable scripts ?
Can u plz make necessary changes in the script...
You dont need a script for that.... check PtokaX help.. the is start and stop script commands...
How can I enable and disable scripts ?
Can u plz make necessary changes in the script...
***when I am not hosting hub but I am master***
QuoteOriginally posted by kash?
How can I enable and disable scripts ?
Can u plz make necessary changes in the script...
***when I am not hosting hub but I am master***
QuoteOriginally posted by madman
You dont need a script for that.... check PtokaX help.. the is start and stop script commands...
in fact... u dont need this script at all... with new PtokaX u can use the commands
!getscripts
!startscript filename.lua
!stopscript filename.lua
and YES masters is allowd to use thoose commands...
those commans by madman are not working in my hub
I have PtokaX 0.3.3.1