Show scripts
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Show scripts

Started by Madman, 13 May, 2005, 05:03:26

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Madman

-- 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... =)
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

MDFP

Perfect!

Nice Script.

Useful.

Thks

Northwind

hi, can u make versio where only master profile can see the script what are running.


Madman

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
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

kash?

#4
gr8 script but Is it possible to enable and disable scripts
 when I am not hosting hub of course but I am master...

Regards,

Dessamator

Ignorance is Bliss.

kash?

How can I enable and disable scripts ?
Can u plz make necessary changes in the script...

Madman

You dont need a script for that.... check PtokaX help.. the is start and stop script commands...
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

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***

Madman

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...
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

kash?

those commans by madman are not working in my hub
I have PtokaX 0.3.3.1

SMF spam blocked by CleanTalk