Recent posts - Page 4
 

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

Recent posts

#31
Support / Re: make issue
Last post by hawaj - 04 July, 2021, 20:26:28
thanke you for that , that helps to sort issue
but ....
now ive got next one .........

┌──(sh㉿Horus)-[~/PtokaX]
└─$ sudo make -f makefile-sqlite
[sudo] hasło użytkownika sh:
c++ -O -g -Wall -Wextra -D_WITH_SQLITE -Iskein/Optimized_32bit -I/usr/include -I/usr/include/lua5.3 -c /home/sh/PtokaX/core/SettingManager.cpp -o /                                        home/sh/PtokaX/obj/SettingManager.o
c++ -O -g -Wall -Wextra -D_WITH_SQLITE -Iskein/Optimized_32bit -I/usr/include -I/usr/include/lua5.3 -c /home/sh/PtokaX/core/TextConverter.cpp -o /h                                        ome/sh/PtokaX/obj/TextConverter.o
c++ -O -g -Wall -Wextra -D_WITH_SQLITE -Iskein/Optimized_32bit -I/usr/include -I/usr/include/lua5.3 -c /home/sh/PtokaX/core/TextFileManager.cpp -o                                         /home/sh/PtokaX/obj/TextFileManager.o
c++ -O -g -Wall -Wextra -D_WITH_SQLITE -Iskein/Optimized_32bit -I/usr/include -I/usr/include/lua5.3 -c /home/sh/PtokaX/core/UdpDebug.cpp -o /home/s                                        h/PtokaX/obj/UdpDebug.o
c++ -O -g -Wall -Wextra -D_WITH_SQLITE -Iskein/Optimized_32bit -I/usr/include -I/usr/include/lua5.3 -c /home/sh/PtokaX/core/UDPThread.cpp -o /home/                                        sh/PtokaX/obj/UDPThread.o
c++ -O -g -Wall -Wextra -D_WITH_SQLITE -Iskein/Optimized_32bit -I/usr/include -I/usr/include/lua5.3 -c /home/sh/PtokaX/core/User.cpp -o /home/sh/Pt                                        okaX/obj/User.o
c++ -O -g -Wall -Wextra -D_WITH_SQLITE -Iskein/Optimized_32bit -I/usr/include -I/usr/include/lua5.3 -c /home/sh/PtokaX/core/utility.cpp -o /home/sh                                        /PtokaX/obj/utility.o
c++ -O -g -Wall -Wextra -D_WITH_SQLITE -Iskein/Optimized_32bit -I/usr/include -I/usr/include/lua5.3 -c /home/sh/PtokaX/core/ZlibUtility.cpp -o /hom                                        e/sh/PtokaX/obj/ZlibUtility.o
cd skein; make
make[1]: Wejście do katalogu '/home/sh/PtokaX/skein'
cc -O -Wall -IOptimized_32bit -c /home/sh/PtokaX/skein/Optimized_32bit/skein.c -o /home/sh/PtokaX/skein/obj/skein.o
cc -O -Wall -IOptimized_32bit -c /home/sh/PtokaX/skein/Optimized_32bit/skein_block.c -o /home/sh/PtokaX/skein/obj/skein_block.o
ar rv skein.a /home/sh/PtokaX/skein/obj/skein.o /home/sh/PtokaX/skein/obj/skein_block.o
ar: creating skein.a
a - /home/sh/PtokaX/skein/obj/skein.o
a - /home/sh/PtokaX/skein/obj/skein_block.o
make[1]: Opuszczenie katalogu '/home/sh/PtokaX/skein'
c++ /home/sh/PtokaX/obj/colUsers.o /home/sh/PtokaX/obj/DB-SQLite.o /home/sh/PtokaX/obj/DcCommands.o /home/sh/PtokaX/obj/DeFlood.o /home/sh/PtokaX/o                                        bj/eventqueue.o /home/sh/PtokaX/obj/GlobalDataQueue.o /home/sh/PtokaX/obj/hashBanManager.o /home/sh/PtokaX/obj/hashUsrManager.o /home/sh/PtokaX/obj                                        /hashRegManager.o /home/sh/PtokaX/obj/HubCommands.o /home/sh/PtokaX/obj/HubCommands-AE.o /home/sh/PtokaX/obj/HubCommands-FH.o /home/sh/PtokaX/obj/H                                        ubCommands-IQ.o /home/sh/PtokaX/obj/HubCommands-RZ.o /home/sh/PtokaX/obj/IP2Country.o /home/sh/PtokaX/obj/LanguageManager.o /home/sh/PtokaX/obj/Lua                                        BanManLib.o /home/sh/PtokaX/obj/LuaCoreLib.o /home/sh/PtokaX/obj/LuaIP2CountryLib.o /home/sh/PtokaX/obj/LuaProfManLib.o /home/sh/PtokaX/obj/LuaRegM                                        anLib.o /home/sh/PtokaX/obj/LuaScript.o /home/sh/PtokaX/obj/LuaScriptManager.o /home/sh/PtokaX/obj/LuaScriptManLib.o /home/sh/PtokaX/obj/LuaSetManL                                        ib.o /home/sh/PtokaX/obj/LuaTmrManLib.o /home/sh/PtokaX/obj/LuaUDPDbgLib.o /home/sh/PtokaX/obj/ProfileManager.o /home/sh/PtokaX/obj/PtokaX-nix.o /h                                        ome/sh/PtokaX/obj/PXBReader.o /home/sh/PtokaX/obj/pxstring.o /home/sh/PtokaX/obj/RegThread.o /home/sh/PtokaX/obj/ResNickManager.o /home/sh/PtokaX/o                                        bj/ServerManager.o /home/sh/PtokaX/obj/ServerThread.o /home/sh/PtokaX/obj/serviceLoop.o /home/sh/PtokaX/obj/SettingManager.o /home/sh/PtokaX/obj/Te                                        xtConverter.o /home/sh/PtokaX/obj/TextFileManager.o /home/sh/PtokaX/obj/UdpDebug.o /home/sh/PtokaX/obj/UDPThread.o /home/sh/PtokaX/obj/User.o /home                                        /sh/PtokaX/obj/utility.o /home/sh/PtokaX/obj/ZlibUtility.o /home/sh/PtokaX/skein/skein.a -o PtokaX -lstdc++ -lpthread -lm -lrt -lz -llua5.3 -ltinyx                                        ml -lsqlite3
/usr/bin/ld: /home/sh/PtokaX/obj/serviceLoop.o: warning: relocation against `_ZN12DBPostgreSQL5m_PtrE' in read-only section `.text'
/usr/bin/ld: /home/sh/PtokaX/obj/HubCommands-FH.o: in function `HubCommands::GetInfo(ChatCommand*)':
/home/sh/PtokaX/core/HubCommands-FH.cpp:402: undefined reference to `DBPostgreSQL::m_Ptr'
/usr/bin/ld: /home/sh/PtokaX/core/HubCommands-FH.cpp:402: undefined reference to `DBPostgreSQL::SearchNick(ChatCommand*)'
/usr/bin/ld: /home/sh/PtokaX/obj/HubCommands-FH.o: in function `HubCommands::GetIpInfo(ChatCommand*)':
/home/sh/PtokaX/core/HubCommands-FH.cpp:559: undefined reference to `DBPostgreSQL::m_Ptr'
/usr/bin/ld: /home/sh/PtokaX/core/HubCommands-FH.cpp:559: undefined reference to `DBPostgreSQL::SearchIP(ChatCommand*)'
/usr/bin/ld: /home/sh/PtokaX/obj/HubCommands-RZ.o: in function `HubCommands::Stats(ChatCommand*)':
/home/sh/PtokaX/core/HubCommands-RZ.cpp:427: undefined reference to `PQlibVersion'
/usr/bin/ld: /home/sh/PtokaX/obj/ServerManager.o: in function `ServerManager::Start()':
/home/sh/PtokaX/core/ServerManager.cpp:520: undefined reference to `DBPostgreSQL::DBPostgreSQL()'
/usr/bin/ld: /home/sh/PtokaX/core/ServerManager.cpp:520: undefined reference to `DBPostgreSQL::m_Ptr'
/usr/bin/ld: /home/sh/PtokaX/core/ServerManager.cpp:520: undefined reference to `DBPostgreSQL::m_Ptr'
/usr/bin/ld: /home/sh/PtokaX/obj/ServerManager.o: in function `ServerManager::FinalStop(bool)':
/home/sh/PtokaX/core/ServerManager.cpp:741: undefined reference to `DBPostgreSQL::m_Ptr'
/usr/bin/ld: /home/sh/PtokaX/core/ServerManager.cpp:741: undefined reference to `DBPostgreSQL::~DBPostgreSQL()'
/usr/bin/ld: /home/sh/PtokaX/core/ServerManager.cpp:742: undefined reference to `DBPostgreSQL::m_Ptr'
/usr/bin/ld: /home/sh/PtokaX/obj/serviceLoop.o: in function `ServiceLoop::ReceiveLoop()':
/home/sh/PtokaX/core/serviceLoop.cpp:800: undefined reference to `DBPostgreSQL::m_Ptr'
/usr/bin/ld: /home/sh/PtokaX/core/serviceLoop.cpp:800: undefined reference to `DBPostgreSQL::UpdateRecord(User*)'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make: *** [makefile-sqlite:58: PtokaX] Błąd 1



i hope u can help me with that as well

best regards hawaj
#32
Support / Re: make issue
Last post by PPK - 04 July, 2021, 19:58:00
Change line 507 from:
if(SetBoolCom[szi] != '\0') {

to
if(SetBoolCom[szi][0] != '\0') {


Change line 530 from:
if(SetShortCom[szi] != '\0') {

to
if(SetShortCom[szi][0] != '\0') {


Change line 553 from:
if(SetTxtCom[szi] != '\0') {

to
if(SetTxtCom[szi][0] != '\0') {


Add to line 1115:
break;
#33
Support / make issue
Last post by hawaj - 04 July, 2021, 17:42:58
hi
iam trying to install ptokax on kali linux (debian)
after trying to make ive got this errors any1 know how can i solve it ???

best regards

┌──(sh㉿Horus)-[~/PtokaX]
└─$ sudo make -f makefile-mysql lua52
c++ -O -g -Wall -Wextra -D_WITH_MYSQL -Iskein/Optimized_32bit -I/usr/include -I/usr/include/lua5.2 -I/usr/include/mysql -I/usr/include/mariadb -c /home/sh/PtokaX/core/SettingManager.cpp -o /home/sh/PtokaX/obj/SettingManager.o
/home/sh/PtokaX/core/SettingManager.cpp: In member function 'void SettingManager::Save()':
/home/sh/PtokaX/core/SettingManager.cpp:507:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  507 |      if(SetBoolCom[szi] != '\0') {
      |         ~~~~~~~~~~~~~~~~^~~~~~~
/home/sh/PtokaX/core/SettingManager.cpp:530:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  530 |      if(SetShortCom[szi] != '\0') {
      |         ~~~~~~~~~~~~~~~~~^~~~~~~
/home/sh/PtokaX/core/SettingManager.cpp:553:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  553 |      if(SetTxtCom[szi] != '\0') {
      |         ~~~~~~~~~~~~~~~^~~~~~~
/home/sh/PtokaX/core/SettingManager.cpp: In member function 'void SettingManager::SetText(size_t, const char*, size_t)':
/home/sh/PtokaX/core/SettingManager.cpp:1112:41: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1112 |             if(szLen == 0 || szLen > 64 || strpbrk(sTxt, " $|") != NULL) {
      |                                         ^
/home/sh/PtokaX/core/SettingManager.cpp:1115:9: note: here
 1115 |         case SETTXT_TCP_PORTS:
      |         ^~~~
make: *** [makefile-mysql:331: /home/sh/PtokaX/obj/SettingManager.o] Błąd 1


#34
Leviathan / Leviathan script (all in one)
Last post by Massi - 30 June, 2021, 19:30:12
Hello  :)

Leviathan script (all in one) in Lua 5.3.4 for Ptokax 0.5.2.2 ??? 8)

Thanks for your support and assistance  ;)

Best Regards,
Massimiliano
#35
Conversion Requests / Re: Command Px
Last post by Massi - 30 June, 2021, 13:45:58
Thanks for your support and assistance ;)

Best Regards,
Massimiliano
#36
Conversion Requests / Re: Regme Px
Last post by Massi - 30 June, 2021, 13:41:54
Take a look here  ;)

https://script-bot.dcstuff.nl/index.php?dir=PtokaX/lua-5-api-2/

Thanks for your support and assistance ;)

Best Regards,
Massimiliano
#37
Finished Scripts / GateKeeper
Last post by Cêñoßy†ê - 30 June, 2021, 10:41:50
GateKeeper written by Cêñoßy†ê
	
	This script includes:
		- Detection of faking users
			- Has on/off option command
			- Detect fake sharesizes (add/delete/show commands)
			- Detect fake files (add/delete/show commands)
		- Detection of forbidden files
			- Has on/off option commands
			- Add/delete/show commands
		- Detection of kademlia enabled clients
			- Has on/off option commands
			- Add/delete/show commands
		- Detection of empty 0b files
			- Has on/off option commands
			- Add/delete/show commands
		- Has allso ignored data database with add/delete/show commands
		- Option to change hubs UDP port
		- Option to set up alternative hub IP
		- Detection logging for 'data' to easyer check what detected when/how many times
		- Report/kick mode for detections (report sends info to op-chat if op-chat enabled,else it sends info to main chat for operators)
		- Adjustable command permissions
			Ptokax default profiles:
				-1 unregistered users
				0  master
				1  operator
				2  vip
				3  reg
	
	Tested on:
		Windows 8.1 ULTIMATE x64 PtokaX 0.5.2.2 556 Lua 5.3
		Windows 10 PRO x64 PtokaX 0.5.2.2 556 Lua 5.3
		Debian 9.0 x64 PtokaX 0.5.2.2 556 Lua 5.3
#38
Conversion Requests / Re: Command Px
Last post by Cêñoßy†ê - 29 June, 2021, 16:08:39
--[[

	PxCommands 1.1g Lite Ed. LUA 5.1 [Strict] [API 2]

	By Mutor	03/07/06
	
	40% less calories than the standard edition :P
	
	-Sends inbuilt PtokaX user commands (per profile permissions)
	-Allows for default custom / commands
	-Allows for raw commands for ops

	+Changes from 1.1 Standard Edition	08/08/07
		-Removed LUA version checking, converted for LUA 5.1 only.
		-Removed PxUtilities dependency and associated functions.
		+Profile commands sent in specific [editable] order.
		+Added profiles 4 - 6 for use with AIO scripts
		~Changed timer function, garbage collection.
		~Changed status message format and method
		~Moved config table to a local variable.
	
	+Changes from 1.1 Lite Ed. 	08/08/07
		-Removed Bot registration & related info.
		-Removed most anything not required for basic function
		+All commands written to external files, one per profile.
		+File read and sent to user at connect
		+Command functions Default, Raw & Prof nil after 1st run
		+This method offers a savings of ~20Kb memory usage

	+Changes from 1.1b Lite Ed.. 	09/14/07
		~Rewritten for the new PtokaX API [0.3.06d +]

	+Changes from 1.1c Lite Ed.. 	11/17/07
		-Removed Core.GetUserAllData in UserConnected, no longer req'd.
		+Added user message to data string

		*Optimizations suggestions by PPK:
		~Changed SendToNick to SendToUser, all data sent together

	+Changes from 1.1d Lite Ed.. 	04/26/08
		+Added custom user commands.


	+Changes from 1.1f Lite Ed.. 	01/11/09
		~Update for profile permission changes in PxLua API [version 0.4.1.2 and later]

	+Changes from 1.1f Lite Ed.. 	02/13/10
		~Changed Custom Commands, Custom Level to full profile table, per command. requested by JiMMy

]]--


local CmdCfg = {
--Command Menu Name ["" = Hub Name]
Menu = "",
--Bot Name ["" = Hub Bot]
Bot = "",
-- Clear the Hub/User menu first, before new commands set is sent at login?  true/false
-- Avoids duplicate menus. ***If enabled, load this script before other command scripts
ClearMenu = true,
--Send raw commands to operators? true/false
SendRaw = true,
}
-- Add your own custom commands
-- Set first value as table of profiles, second as typical User Command, ending in ||
CustomCmds = {
	--{{[-1]=false,[0]=true,[1]=true,[2]=true,[3]=true},"$UserCommand 1 1 Menu\\SubMenu\\Command Description$<%[mynick]> +command %[line:arg]&#124;|"}
	{{[-1]=true,[0]=true,[1]=true,[2]=true,[3]=true},"$UserCommand 1 3 Menu\\SubMenu\\Common Knowledge$<%[mynick]> Mutor is dead sexy!&#124;|"},
}

OnStartup = function()
	Set=function(a,v,h)--(arg,val,hub)
		if a == "" then if h then return SetMan.GetString(v) else return v end else return a end
	end
	CmdCfg.Bot = Set(CmdCfg.Bot,21,true) CmdCfg.Menu = Set(CmdCfg.Menu,0,true)
	CmdCfg.Path = Core.GetPtokaXPath().."scripts/"
	local t,x = ProfMan.GetProfiles(),DefaultCmds(-1)
	for i,v in ipairs(t) do
		local p = i-1
		local Commands = DefaultCmds(p)
		if CmdCfg.SendRaw and ProfMan.GetProfile(p).tProfilePermissions.bIsOP then
			local Raw = RawCmds(p)
			if Raw then Commands = Commands..Raw end
		end
		Commands = Commands..ProfCmds(p)
		local f,e = io.open(CmdCfg.Path..p..".uc","wb")
		f:write("return "..string.format("%q",Commands)) f:flush() f:close()
	end
	local f,e = io.open(CmdCfg.Path.."-1.uc","wb")
	f:write("return "..string.format("%q",x)) f:flush() f:close()
	DefaultCmds,RawCmds,ProfCmds = nil,nil,nil
end

UserConnected = function(user)
	if loadfile(CmdCfg.Path..tostring(user.iProfile)..".uc") then
		local x,count = dofile(CmdCfg.Path..tostring(user.iProfile)..".uc")
		if x then _,count = x:gsub("&#124;|","%1") end
		if x then _,count = x:gsub("UserCommand","%1") end
		if count and count > 0 then
			if CmdCfg.ClearMenu then x = "$UserCommand 255 3 "..CmdCfg.Menu.."&#124;|"..x end
			local HubApp,HubVer,Prof = "PtokaX", Core.Version,"Unregistered User"
			if user.iProfile ~= -1 then Prof = ProfMan.GetProfile(user.iProfile).sProfileName end
			x = x.."<"..CmdCfg.Bot.."> Welcome "..user.sNick..", [ "..
			tostring(count).." ] "..Prof.."'s "..HubApp.." "..HubVer.." commands enabled. Right "..
			"click hub tab or user list for menu.|"
			for i,v in ipairs(CustomCmds) do
				if v[1][user.iProfile] then x = x..v[2] end
			end
			Core.SendToUser(user,x)
		end
	end
end
RegConnected,OpConnected = UserConnected,UserConnected

DefaultCmds = function(idx)
	local str,pfx,menu = "",SetMan.GetString(29):sub(1,1) or "+",CmdCfg.Menu
	--//-- Add your custom/default commands here
	--//-- 	Index = {
	--//--	  [0] = {[-1]=1,[0]=1,[1]=1,[2]=1,[3]=1},
	--//--		[#] = {"command", "args", "Command Description", "Submenu", *Context},
	--//--	  },
	--//--
	--//-- Key [0] contains idx profiles, use =1 to enable that profile, =0 to disable
	--//-- *Context
	--//-- 1=Hub Menu 2=User Menu 3=Hub/User Menu 4 = File[Search] 5 = Hub/File 6 = User/File 7 = Hub/User/File
	local Default = {
	[1] = {
		[0] = {[-1]=true,[0]=true,[1]=true,[2]=true,[3]=1},
		[1] = {"help", "", "Get Command Help", "General",3,},
		},
	[2] = {
		[0] = {[-1]=false,[0]=true,[1]=true,[2]=true,[3]=true,},
		[1] = {"passwd", " %[line:New Password]", "Change Your Password", "General",3},
		},
	[3] = {
		[0] = {[-1]=true,[0]=true,[1]=true,[2]=true,[3]=true,},
		[1] = {"myip", "", "Display Your IP Address", "General",3},
		},
	[4] = {
		[0] = {[-1]=false,[0]=true,[1]=true,[2]=true,[3]=true,},
		[1] = {"me", " %[line:Say What?]", "Speak In The Third Person", "General",3},
		},
	[5] = {
		[0] = {[-1]=true,[0]=true,[1]=true,[2]=true,[3]=true,},
		[1] = {"stats", "", "Get Hub Statistics", "General",3},
		},
	[6] = {
		[0] = {[-1]=true,[0]=true,[1]=true,[2]=true,[3]=true,},
		[1] = {"memstats", "", "Get Hub Memory Statistics", "General",3},
		},
	}
	for i,v in ipairs(Default) do
		if v[0][idx]then
			for a,b in ipairs(v) do
				if a > 0 then
					str = str.."$UserCommand 1 "..b[5].." "..menu.."\\"..b[4].."\\"..
					b[3].." $<%[mynick]> "..pfx..b[1]..b[2].."&#124;|"
				end
			end
		end
	end
	return str
end

--There is not a whole lot of need for this but I was bored
--Note: Badly formed raw commands will disconnect you from hub
--These commands offered as examples, check your hub settings before use
RawCmds = function(idx)
	local str,menu,rda,srda = "",CmdCfg.Menu,
	SetMan.GetString(6) or " %[line:Redirect To? (Address:Port)]",
	SetMan.GetString(12) or " %[line:Redirect Bad Share To? (Address:Port)]"
	local RawCommands = {
	[1] = {
		[1] = {"$$To:"," %[nick] From: %[mynick] $<%[mynick]> %[line:Message (Select Nicks First)]",
		"Selective Private Message","Messages",2},
		},
	[2] = {
		[1] = {"$$OpForceMove", " $Who:%[line:Victim Nick]$Where:"..rda..
		"$Msg:%[line:Reason]", "Redirect To Default", "User Admin",1},
		[2] = {"$$OpForceMove", " $Who:%[nick]$Where:"..rda..
		"$Msg:%[line:Reason]", "Redirect To Default", "User Admin",2},
		[3] = {"$$OpForceMove", " $Who:%[line:Victim Nick]$Where:"..srda..
		"$Msg:%[line:Reason]", "Redirect Bad Share", "User Admin",1},
		[4] = {"$$OpForceMove", " $Who:%[nick]$Where:"..srda..
		"$Msg:%[line:Reason]", "Redirect Bad Share", "User Admin",2},
		},
	[3] = {
		[1] = {"$$Quit"," %[mynick]","Disconnect From Hub","Hub Admin",2},
		},
	[4] = {
		[1] = {"$$Close"," %[line:Close Who?]","Close User","User Admin",1},
		[2] = {"$$Close"," %[nick]","Close User","User Admin",2},
		},
	[5] = {
		[1] = {"$$To:"," %[line:Nick] From: %[mynick] $<%[mynick]> You are being kicked.&#124;&#124;<%[mynick]> is kicking %[line:Nick]&#124;&#124;$Kick %[line:Nick]","Kick User","Raw Cmds",1},
		[2] = {"$$To:"," %[nick] From: %[mynick] $<%[mynick]> You are being kicked.&#124;&#124;<%[mynick]> is kicking %[nick]&#124;&#124;$Kick %[nick]","Kick User","Raw Cmds",2},
		},
	}
	for i,v in ipairs(RawCommands) do
		for a,b in ipairs(v) do
			str = str.."$UserCommand 1 "..b[5].." "..menu.."\\"..
			b[4].."\\"..b[3]..b[1]..b[2].."&#124;|"
		end
	end
	return str
end

ProfCmds = function(idx)
	local str,pfx,menu,perms = "",SetMan.GetString(29):sub(1,1) or "+",CmdCfg.Menu,ProfMan.GetProfile(idx).tProfilePermissions
	--Format change here, don't edit the first [1] key/value pair of each command or script will fail
	-- You may however, edit entries after [1] if you'd like
	local Commands = {
	[1] = {
		[1] = {bTempUnban = 0},
		[2] = {"tempunban", " %[line:Nick Or IP To unban]", "Temp Unban Nick/IP", "Ban Admin",3},
		},
	[2] = {
		[1] = {bGetInfo = 0},
		[2] = {"getinfo", " %[nick]", "Get User Info", "User Info",2},
		},
	[3] = {
		[1] = {bGag = 0},
		[2] = {"gag", " %[line:Nick To Gag]", "The User Can't Post To Mainchat Anymore", "User Admin",1},
		[3] = {"gag", " %[nick]", "The User Can't Post To Mainchat Anymore", "User Admin",2},
		[4] = {"ungag", " %[line:Nick To Ungag]", "The User Can Post To Mainchat Again", "User Admin",1},
		[5] = {"ungag", " %[nick]", "The User Can Post To Mainchat Again", "User Admin",2}
		},
	[4] = {
		[1] = {bGetBans = 0},
		[2] = {"getbans", "", "Display Bans", "Ban Admin",3},
		[3] = {"getpermbans", "", "Display Permanent Bans", "Ban Admin",3},
		[4] = {"gettempbans", "", "Display Temporary Bans", "Ban Admin",3},
		[5] = {"checknickban", " %[line:Check This Nick]", "Check Nick For Ban", "Ban Admin",3},
		[6] = {"checkipban", " %[line:Check This IP]", "Check IP For Ban", "Ban Admin",3},
		},
	[5] = {
		[1] = {bMassMsg = 0},
		[2] = {"massmsg", " %[line:Mass Message For Users]", "Send A Private Message To All Users", "Messages",3},
		[3] = {"opmassmsg", " %[line:Mass Message For Ops]", "Send A Private Message To All Ops", "Messages",3},
		},
	[6] = {
		[1] = {bClearRangeTempBans = 0},
		[2] = {"clrrangetempbans", "", "Clear Temporary Range Bans", "Range Ban Admin",3},
		},
	[7] = {
		[1] = {bRangeUnban = 0},
		[2] = {"rangeunban", " %[line:Start Of IP Range] %[line:End Of IP Range]", "Unban An IP Range", "Range Ban Admin",3},
		},
	[8] = {
		[1] = {bTopic = 0},
		[2] = {"topic", " %[line:Topic (off = Clear Topic)]", "Set/Change/Clear Hub Topic", "Hub Admin",3},
		},
	[9] = {--m=Mins, h=Hours, d=Days, w=Weeks, M=Months, Y=Years.
		[1] = {bTempBan = 0},
		[2] = {"tempban", " %[nick] %[line:Time To Ban] %[line:Reason For Ban]", "Temp Ban User", "Ban Admin",2},
		[3] = {"nicktempban", " %[nick] %[line:Time To Ban] %[line:Reason For Ban]", "Temp Ban Nick", "Ban Admin",2},
		[4] = {"tempbanip", " %[ip] %[line:Time To Ban] %[line:Reason For Ban]", "Temp Ban IP", "Ban Admin",2},
		[5] = {"fulltempban", " %[nick] %[line:Time To Ban] %[line:Reason For Ban]", "Full Temp Ban Nick", "Ban Admin",2},
		[6] = {"fulltempbanip", " %[ip] %[line:Time To Ban] %[line:Reason For Ban]", "Full Temp Ban IP", "Ban Admin",2},
		},
	[10] = {
		[1] = {bKick = 0},
		[2] = {"$$Kick", " %[line:Nick To Kick]", "Kick User", "User Admin",1},
		[3] = {"$$Kick", " %[nick]", "Kick User", "User Admin",2},
		},
	[11] = {
		[1] = {bRestartScripts = 0},
		[2] = {"getscripts", "", "Display Current Script & Status", "Hub Admin",3},
		[3] = {"restartscripts", "", "Restart All Scripts", "Hub Admin",3},
		[4] = {"startscript", " %[line:Script Filename]", "Start Specified Script", "Hub Admin",3},
		[5] = {"stopscript", " %[line:Script Filename]", "Stop Specified Script", "Hub Admin",3},
		[6] = {"restartscript", " %[line:Script Filename]", "Restart Specified Script", "Hub Admin",3},
		},
	[12] = {
		[1] = {bRangeTempBan = 0},
		[2] = {"rangetempban", " %[line:Start Of IP Range] %[line:End Of IP Range] %[line:Time For Ban] %[line:Reason For Ban]", "Temporary Ban An IP Range", "Range Ban Admin",3},
		[3] = {"fullrangetempban", " %[line:Start Of IP Range] %[line:End Of IP Range] %[line:Time For Ban] %[line:Reason For Ban]", "Full Temporary Ban An IP Range", "Range Ban Admin",3},
		},
	[13] = {
		[1] = {bTempOP = 0},
		[2] = {"op", " %[line:Nick]", "Grant Temporary Op Status To User For One Session", "Registration",1},
		[3] = {"op", " %[nick]", "Give Temporary Op Status To User For One Session", "Registration",2},
		},
	[14] = {
		[1] = {bAddRegUser = 0},
		[2] = {"addreguser", " %[line: Nick To Register] %[line:Password For Nick] %[line:Profile (Reg/VIP/Operator/Master)]", "Register A User", "Registration",1},
		[3] = {"addreguser", " %[nick] %[line:Password For Nick] %[line:Profile (Reg/VIP/Operator/Master)]", "Register A User", "Registration",2},
		},
	[15] = {
		[1] = {bUnban = 0},
		[2] = {"unban", " %[line:Nick or IP to Unban]", "Unban Nick/IP", "Ban Admin",3},
		[3] = {"permunban", " %[line:Nick or IP to Unban]", "Perm Unban Nick/IP", "Ban Admin",3},
		},
	[16] = {
		[1] = {bClrPermBan = 0},
		[2] = {"clrpermbans", "", "Clear Permanent Bans", "Ban Admin",3},
		},
	[17] = {
		[1] = {bRangeTempUnban = 0},
		[2] = {"rangetempunban", " %[line:Start Of IP Range] %[line:End Of IP Range] %[line:Time For Ban] %[line:Reason For Ban]", "Unban Temporary IP Range Ban", "Range Ban Admin",3},
		},
	[18] = {
		[1] = {bDelRegUser = 0},
		[2] = {"delreguser", " %[line:Nick To Delete]", "Delete A User From Registry", "Registration",1},
		[3] = {"delreguser", " %[nick]", "Delete A User From Registry", "Registration",2},
		},
	[19] = {
		[1] = {bClearRangePermBans = 0},
		[2] = {"clrrangepermbans", "", "Clear Permanent Range Bans", "Range Ban Admin",3},
		},
	[20] = {
		[1] = {bRefreshTxt = 0},
		[2] = {"reloadtxt", "", "Reload Textfiles", "Hub Admin",3},
		},
	[21] = {
		[1] = {bRangeBan = 0},
		[2] = {"rangeban", " %[line:Start Of IP Range] %[line:End Of IP Range] %[line:Reason For Ban]", "Permanently Ban An IP Range", "Range Ban Admin",3},
		[3] = {"fullrangeban", " %[line:Start Of IP Range] %[line:End Of IP Range] %[line:Reason For Ban]", "Permanently Ban An IP Range", "Range Ban Admin",3},
		},
	[22] = {
		[1] = {bGetRangeBans = 0},
		[2] = {"getrangebans", "", "Display Banned IP Ranges", "Range Ban Admin",3},
		[3] = {"getrangepermbans", "", "Display Permanently Banned IP Ranges", "Range Ban Admin",3},
		[4] = {"getrangetempbans", "", "Display Temporarily Banned IP Ranges", "Range Ban Admin",3},
		[5] = {"checkrangeban", " %[line:Start Of IP Range] %[line:End Of IP Range]", "Check Bans For This IP Range", "Range Ban Admin",3},
		},
	[23] = {
		[1] = {bDrop = 0},
		[2] = {"drop", " %[line:Nick To Drop] %[line:Reason For Drop]", "Silent Kick With Tempban", "User Admin",1},
		[3] = {"drop", " %[nick] %[line:Reason For Drop]", "Silent Kick With Tempban", "User Admin",2},
		},
	[24] = {
		[1] = {bBan = 0},
		[2] = {"ban", " %[nick] %[line:Reason For Ban]", "Ban By Nickname", "User Admin",1},
		[3] = {"ban", " %[line:Nick To Ban] %[line:Reason For Ban]", "Ban By Nickname", "User Admin",2},
		[4] = {"nickban", " %[line:Nick To Ban] %[line:Reason For Ban]", "Ban Nickname", "User Admin",1},
		[5] = {"nickban", " %[nick] %[line:Reason For Ban]", "Ban Nickname", "User Admin",2},
		[6] = {"banip", " %[line:Ban This IP] %[line:Reason For Ban]", "Ban IP Address", "User Admin",1},
		[7] = {"banip", " %[ip] %[line:Reason For Ban]", "Ban IP Address", "User Admin",2},
		[8] = {"fullbanip"," %[line:Ban This IP] %[line:Reason For Ban]", "FullBan IP Address", "User Admin",1},
		[9] = {"fullbanip"," %[ip] %[line:Reason For Ban]", "FullBan IP Address", "User Admin",2},
		},
	[25] = {
		[1] = {bRestartHub = 0},
		[2] = {"restart", "", "Restart The Hub", "Hub Admin",3},
		},
	[26] = {
		[1] = {bClrTempBan = 0},
		[2] = {"clrtempbans", "", "Clear Temporary Bans", "Ban Admin",3},
		},
	}
	for i,v in ipairs(Commands) do
		local t = {}
		for key,val in pairs(v[1]) do if perms[key] then t = v end end
		if next(t) then
			for a,b in ipairs(t) do
				if a > 1 then
					local uc,pre,p = "$UserCommand 1 "," $<%[mynick]> "..pfx,"&#124;|"
					if i == 10 then pre = "" end
					str = str..uc..b[5].." "..menu.."\\"..b[4].."\\"..b[3]..pre..b[1]..b[2]..p
				end
			end
		end
	end
	return str
end
#39
Conversion Requests / Re: Regme Px
Last post by Cêñoßy†ê - 29 June, 2021, 16:01:15
Try this.
I wonder where you get your scripts in that format ?

--[[

	RegMe 1.0g LUA 5.11 [Strict][API 2]
	
	By Mutor	04/07/07
	
	Self Registration / Change Password Script
	
	-Checks if user is already registered
	-Checks for invalid characters in nick and password
	-Context menus [right click]
	-Responds to user in PM only
	-Existing password required to changed password
	-Prompts unregisted user to reg at script start and at user connect
	
	+Changes from 1.0	04/07/07	Requested by Yahoo
		+Added block unregistered user file transfer/search/chat and pm to non ops
		+Added 'block' message to unregistered user at connect attempt
		+Added report new self-registered user to online ops.
		
	+Changes from 1.0b	04/13/07
		+Added report Unregistered User login to OpNick 	Requested by Yahoo
		
	+Changes from 1.0c	10/21/07
		~Converted for the new PtokaX API

	+Changes from 1.0d	10/21/07
		~Bugfix in user reg, forgot all user data must be requested. Report by DarkElf

	+Changes from 1.0e	02/16/08
		+Added RegOnly/RegChat/RegPms options. Requested by Giorgos
		+Added Report option
		~Changed all SendToNick to SendToUser [faster call]

	+Changes from 1.0f	10/06/09
		+Blocked invalid command syntax, Requested by alcorp.
		+Filtered help message per profile status.
		+Added option for command notification to connecting users.

	RegMe Command Help

	Command		Description 
	¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
	!rmhelp		RegMe Command Help 
	!regme		Register Yourself  
	!passwd		Change Your Password  

	¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
	
]]

--//--
-- Disable transfer and search by unregistered users? true/false
local RegOnly = true
-- Disable chat for unregistered users? true/false
local RegChat = true
-- Disable private messages for unregistered users? true/false [pm's to ops are never blocked]
local RegPms = true
-- Report unregistered user logins to OpNick? true/false
local Report = true
-- Report nick for error messages and unregistered user logins [if Report = true]
local OpNick = "Mutor"
-- Show command notification to new connections? true/false
local Notify = true
--//--


local Bot,Scp,Pfx,Menu,SubMenu = "","","","",""
local BlockMsg = "\r\n\r\n\tUnregistered users may not chat, pm, search or transfer files in this hub.\r\n"..
"\tYou may pm operators for assistance. You may also self-register by typing.\r\n"..
"\t!regme <password> or use context menu commands [right click].\r\n\r\n"

OnStartup = function()
	Bot,Scp,Pfxs = SetMan.GetString(21),"RegMe 1.0g by Mutor",SetMan.GetString(29)
	Menu,SubMenu,Pfx =SetMan.GetString(0),"Self Registration",Pfxs:sub(1,1)
	for _,user in ipairs(Core.GetOnlineUsers(-1)) do
		Core.SendToUser(user,"<"..Bot.."> "..BlockMsg..RegCmds["rmhelp"](user,data,cmd))
	end
end

UserConnected = function(user)
	if user.iProfile == -1 then
		SendCmds(user)
		if Report then
			OnError("The Unregistered User: "..user.sNick.." has logged in to "..SetMan.GetString(0))
		end
		if RegOnly then
			Core.SendToUser(user,"<"..Bot.."> "..BlockMsg..RegCmds["rmhelp"](user,data,cmd))
		end
	end
end
OpConnected,RegConnected = UserConnected,UserConnected

ChatArrival = function(user,data)
	local _,_,pfx,cmd = data:find("%b<> (["..Pfxs.."])(%a+)")
	if pfx and cmd then
		cmd = cmd:lower()
		local i = user.iProfile
		local p = "Unregistered User",user.iProfile
		if i ~= -1 then p = ProfMan.GetProfile(i).sProfileName end
		local msg = "Sorry "..user.sNick..", "..p.."'s may not use the "..pfx..cmd.." command."
		if RegCmds[cmd] then
			if i == -1 and cmd == "regme" or i ~= -1 and cmd == "passwd" or cmd == "rmhelp" then
				return Core.SendPmToUser(user,Bot,RegCmds[cmd](user,data,cmd)), true
			else
				return Core.SendPmToUser(user,Bot,msg), true
			end
		else
			return Core.SendToUser(user,"<"..Bot.."> "..msg),
			Core.SendToUser(user,"<"..Bot.."> "..BlockMsg),true
		end
	else
		local _,_,to,from = string.find(data,"^$To: (%S+) From: (%S+)")
		if to and from then
			if RegPms and user.iProfile == -1 then
				local prof = Core.GetUser(to)
				if prof then
					if not Core.GetUserValue(prof,11) then
						return Core.SendPmToUser(user,to,"<"..Bot.."> "..BlockMsg),true
					end
				else
					return true
				end
			end
		else
			if RegChat and user.iProfile == -1 then
				return Core.SendToUser(user,"<"..Bot.."> "..BlockMsg),true
			end
		end
	end
end
ToArrival = ChatArrival

ConnectToMeArrival = function(user, data)
	if RegOnly and user.iProfile == -1 then
		local CtmMsg = "\t*Please remove this transfer from your download queue.*"
		return Core.SendToUser(user,"<"..Bot.."> "..BlockMsg..
		CtmMsg:gsub(" ",string.char(160)).."\r\n\r\n|"),true
	end
end
RevConnectToMeArrival = ConnectToMeArrival

SearchArrival = function (user, data)
	if RegOnly and user.iProfile == -1 then
		local _,_,search = string.find(data,"([^?]+)|$")
		if search then
			local t = "TTH:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"--hash(t) in lieu of hub(h)
			local n,h,b,i,u = user.sNick,SetMan.GetString(0),SetMan.GetString(21),
			SetMan.GetString(3):gsub(";.*",""),SetMan.GetString(4)
			local res = "Unknown Path"..string.char(92)..n..", search is "..
			"disabled for you :P "..string.rep("\t",15)..search
			return Core.SendToUser(user,"$SR "..b.." "..res.." 0 1/2"..t.." ("..i..":"..u..")|"..
			"<"..Bot.."> "..n..", search is disabled for you. Please close the "..
			string.format("%q",search:gsub("%$"," ")).." search window. Thank you.|"),true
		end
	end
end

OnError = function(msg)
	local user = Core.GetUser(OpNick)
	if user then
		Core.SendToUser(user,"<"..Bot.."> "..msg)
	end
end

SendCmds = function(user)
	local n,b = user.iProfile
	for i,v in pairs(RegCmds) do
		local c = i:lower()
		if n == -1 and c == "regme" or n ~= -1 and c == "passwd" or c == "rmhelp" then
			local desc,arg1,arg2 = RegCmds[i]()
			Core.SendToUser(user,"$UserCommand 1 1 "..Menu.."\\"..SubMenu.."\\"..
			desc.."$<%[mynick]> "..Pfx..i..arg1.."&#124;")
			Core.SendToUser(user,"$UserCommand 1 2 "..Menu.."\\"..SubMenu.."\\"..
			desc.."$<%[mynick]> "..Pfx..i..arg2.."&#124;")
			if not b then b = true end
		end
	end
	if b and Notify then
		local Prof = "Unregistered User"
		if user.iProfile > -1 then Prof = ProfMan.GetProfile(user.iProfile).sProfileName end
		Core.SendToUser(user,"<"..Bot.."> "..Prof.."'s "..Scp.." commands "..
		"enabled. See hub tab or user list for a menu.")
	end
end

FormatSize = function(int)
	local i,u,x = tonumber(int) or 0,{"","K","M","G","T","P"},1
	while i > 1024 do i,x = i/1024,x+1 end return string.format("%.2f %sB.",i,u[x])
end

RegCmds = {
	regme = function(user,data,cmd)
		if user then
			local nick = user.sNick
			if user.iProfile ~= -1 then
				return "Don't be silly "..nick.." you're already registered here."
			elseif Core.GetUserAllData(user) then
				local _,_,pwd = data:find("%b<> %p%w+ (%S+)|$")
				if pwd then
					if nick:find("[%c\$\|\<\>\:\?\*\"\/\\]") then
						return "Your nickname contains invalid characters. "..
						"Please choose a new one."
					end
					if pwd:find("[%c\$\|\<\>\:\?\*\"\/\\]") then
						return "Your password contains invalid characters. "..
						"Please choose a new one."
					end
					local hub = SetMan.GetString(0)
					local addy = SetMan.GetString(2)..":"..SetMan.GetString(3)
					local share,ip = FormatSize(user.iShareSize),user.sIP
					local slots = user.iSlots or 0
					local mode = "Passive"
					if user.bActive then mode = "Active" end
					if user.sMode and user.sMode == "5" then mode = "Socks5" end
					local opmsg = "\r\n\r\n\tA user has self-registered\r\n"..
					"\twith the the following details:\r\n"..
					"\t"..string.rep("¯",22).."\r\n"..
					"\tNick:\t"..nick.."\r\n"..
					"\tPass:\t"..pwd:gsub(".","x").."\r\n"..
					"\tShare:\t"..share.."\r\n"..
					"\tI.P.:\t"..ip.."\r\n"..
					"\tMode:\t"..mode.."\r\n"..
					"\tSlots:\t"..slots.."\r\n"
					RegMan.AddReg(nick, pwd, 3)
					Core.SendToOps("<"..Bot.."> "..opmsg)
					return "\r\n\r\n\tWelcome. You have successfully "..
					"registered yourself.\r\n\t"..string.rep("¯",40).."\r\n"..
					"\tHub Name:\t"..hub.."\r\n"..
					"\tHub Address:\t"..addy.."\r\n"..
					"\tUser Name:\t"..nick.."\r\n"..
					"\tPassword:\t"..pwd.."\r\n\r\n"..
					"\t"..string.rep("¯",40).."\r\n"..
					"\tPlease make a note of this information.\r\n"..
					"\tPlease reconnect to activate your status.\r\n"
				else
					return "Error! Usage: "..Pfx..cmd.." <password>"
				end
			end
		else
			return "Register Yourself "," %[line:Password]"," %[line:Password]"," <password>>"
		end
	end,
	passwd = function(user,data,cmd)
		if user then
			if user.iProfile == -1 then
				return "Don't be silly "..user.sNick.." you're not registered here."
			elseif Core.GetUserAllData(user) then
				local _,_,oldpass,newpass = data:find("%b<> %p%w+ (%S+) (.+)|$")
				if oldpass and newpass then
					local pwd,prof = RegMan.GetReg(user.sNick).sPassword,user.iProfile
					if pwd and prof then
						if oldpass:lower() ~= pwd:lower() then
							return "That is not your correct password. "..
							"Please try again. [case insensitive]"
						end
						if newpass:find("[%c\$\|\<\>\:\?\*\"\/\\]") then
							return "Your new password contains invalid characters. "..
							"Please choose a new one."
						end
						if newpass:lower() == oldpass:lower() then
							return "Your cannot change to the same password. "..
							"Please choose a new one."
						end
						RegMan.ChangeReg(user.sNick, newpass, prof)
						return "You have successfully changed your password from "..
						oldpass.." to "..newpass
					end
				else
					return "Error! Usage: ."..Pfx..cmd.." <old password> <new password>"
				end
			end
		else
			return "Change Your Password"," %[line:Old Password] %[line:New Password]",
			" %[line:Old Password] %[line:New Password]"," <old password> <new password>"
		end
	end,
	rmhelp = function(user,data,cmd,reg)
		if user then
			local n,b = user.iProfile
			local reply = "\r\n\r\n\t"..Scp.." Help\r\n\r\n\tCommand\t\tDescription\r\n"..
			"\t"..string.rep("¯",40).."\r\n"
			for i,v in pairs(RegCmds) do
				local c = i:lower()
				if n == -1 and c == "regme" or n ~= -1 and c == "passwd" or c == "rmhelp" then
				local desc = RegCmds[i]()
				reply = reply.."\t"..Pfx..string.format("%-15s",i).."\t"..desc.."\r\n"
				end
			end
			return reply.."\n\t"..string.rep("¯",40).."\r\n\r\n"
		else
			return "RegMe Help","",""
		end
	end,
}
#40
Conversion Requests / Re: ChatBot Px
Last post by Massi - 29 June, 2021, 13:45:04
Very good! Thanks for your support, assistance and testing :) and excuse me  ;)

Best Regards,
Massimiliano
SMF spam blocked by CleanTalk