Simple command blocker per Profile


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

Main Menu

Simple command blocker per Profile

Started by the-master, 19 December, 2014, 13:51:32

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


To block users for using req/rel part of DixbiT I created a small script but it can be used for any command.
ProfNotAllow={  -- profilelist
	[-1]=1, -- unregistered users
	[3]=1,  -- Regs

Block={ -- commands to block

function ChatArrival(user,data)
	local _,_,msg = data:find( "%b<> (.+)")
	local _,_,cmd = data:find( "^%b<> (%p%a+)")
	local _,_,arg = data:find( "^%b<> %p%a+ (%S+)|")
	if (ProfNotAllow[user.iProfile]==1) then
		if Check(cmd) then
		Core.SendToUser(user,"***Command  "..cmd.." Is Not allowed for your Profile")
			return true

function Check(cmd)
	for i = 1,#Block do
		if string.find( cmd, Block[i] , 1 , true ) then
			return 1

P.S. This script should run in PtokaX ABOVE all scripts or at least above the script it needs to block commands .
keep on sharing :)


Why is script needed for that when it is possible to set in dixbot ?  :shocking:
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall


Because we didn't have the DxMngr at that time, but it can be used for any command to block..
Not all hubowners are scripters to  :'(
keep on sharing :)

SMF spam blocked by CleanTalk