Op-Blocker 1.0 LUA 5.0/5.1
 

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

Op-Blocker 1.0 LUA 5.0/5.1

Started by lito, 17 March, 2007, 11:40:36

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lito

is it possible to changes this script so you can allow some profiles to download from ops

--[[

   Op-Blocker 1.0 LUA 5.0/5.1

   by Mutor        04/09/06
   
   Requested by Braum

   Blocks file transfers from op by non-ops.
]]

ConnectToMeArrival = function(user, data)
   local s,e,op = string.find(data,"^$ConnectToMe%s(%S+)")
   if not op then
      local s,e,op = string.find(data,"^$RevConnectToMe%s%S+%s(%S+)|$")
   end
   if op and GetProfilePermissions(GetUserProfile(op))["bIsOP"] == 1 then
      if not user.bOperator then
              user:SendData(GetProfileName(user.iProfile).."'s may not download from "..
         "an operator. Please clear the transfer from "..op.." your download queue.")
         return 1
      end
   end
end
RevConnectToMeArrival = ConnectToMeArrival

Lito :)

6Marilyn6Manson6

--[[

   Op-Blocker 1.0 LUA 5.0/5.1

   by Mutor        04/09/06
   
   Requested by Braum

   Blocks file transfers from op by non-ops.
]]
-- Modded by 6Marilyn6Manson6, requested by lito 17/03/2007
-- Not Tested
------------------------------------------------------
BlockProfiles={						-- 0 = Not Allow Download From OPs / 1 = Allow Download From OPs
[0]=1,  -- Profile #0 (Registered)
[1]=1,  -- Profile #1 (VIP)
[2]=0,  -- Profile #2 (Operator)
[3]=0,  -- Profile #3 (Moderator)
[4]=0,  -- Profile #4 (Master)
[5]=0,  -- Profile #5 (Netfounder)
[-1]=1, -- Profile #-1 (Unregistered)
}
------------------------------------------------------
------------------------------------------------------
ConnectToMeArrival = function(user, data)
   local s,e,op = string.find(data,"^$ConnectToMe%s(%S+)")
   if not op then
      local s,e,op = string.find(data,"^$RevConnectToMe%s%S+%s(%S+)|$")
   end
   if op and GetProfilePermissions(GetUserProfile(op))["bIsOP"] == 1 then
      if BlockProfiles[user.iProfile] == 1 then
              user:SendData(GetProfileName(user.iProfile).."'s may not download from "..
         "an operator. Please clear the transfer from "..op.." your download queue.")
         return 1
      end
   end
end
RevConnectToMeArrival = ConnectToMeArrival
------------------------------------------------------
--// 6Marilyn6Manson6


Try this version

lito

thanks 6Marilyn6Manson6 it works fin

Lit ;D

6Marilyn6Manson6


SMF spam blocked by CleanTalk