GetProfileList Script for LUA5
 

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

GetProfileList Script for LUA5

Started by Paco, 17 September, 2005, 18:28:15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paco

My OPs where making me crazy because they didn't had a straight, simple manner of obtaining updated list of the profiles. I searched a littkle bit and I come other the friend Mutor's script. With my few knowledges I translated the functions to LUA 5 and here it is for all those who need it.
--- Original author: Mutor, original source: LUA4
---comands: +listreg / +listvip / +listop / +listmod / +listmaster / +listfounder / +listall
bot = frmHub:GetHubBotName()  --- system bot name
---use with command
Prefix = "+"
---filter command in main chat
function ChatArrival (user, data)
	if user.bOperator then
		local s,e,cmd = string.find(data, "%b<>%s+(%S+)(%S+)")
				if cmd == Prefix.."listreg" then
				Show(user,"Reg")
				elseif cmd == Prefix.."listvip" then
					Show(user,"VIP")
				elseif cmd == Prefix.."listop" then	
					Show(user,"Operator")
				elseif cmd == Prefix.."listmod" then
					Show(user,"Moderator")
				elseif cmd == Prefix.."listmaster" then
					Show(user,"Master")
				elseif cmd == Prefix.."listfounder" then
					Show(user,"NetFounder")
				elseif cmd == Prefix.."listall" then
					Show(user,"Reg")
					Show(user,"VIP")
					Show(user,"Operator")
					Show(user,"Moderator")
					Show(user,"Master")
					Show(user,"NetFounder")
				end
	else
	end
end
---Generate List for a given profile
function Show(user,which)
	user:SendPM (bot,"")
	user:SendPM (bot,"\t\tList for Profile - "..which)
	user:SendPM (bot,"\t---<>--------------------------------------------------<>--")
	local aux,usr
	for aux, usr in GetUsersByProfile(which) do
		user:SendPM(bot,"\t\t"..usr)
	end
		user:SendPM (bot,"")
end

chettedeboeuf

Thank you Mutor

I will test it

(-=TrIp-iN-SuN=-)

how it's work i don't understnad i get all time i talk aboat Mutor script

(-=TrIp-iN-SuN=-)

These are the current profiles, index # and name.

   0 )  -Master
   1 )  -Operator
   2 )  -VIP
   3 )  -Reg
   4 )  -SuperOp
   5 )  -HubOwner

   Type an index number for a profile to get a list of users


SMF spam blocked by CleanTalk