search. dl and pm blockeer for non regged ?
 

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

search. dl and pm blockeer for non regged ?

Started by UwV, 27 February, 2005, 03:19:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

UwV

i would really like,..
 
no pm for non regged
no search for non regged
and no dl for non-regged ..

that would be a nice one ..

all three yes/no option  offcourse  ;)
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

[NL]Pur

this should work ;)


-- disableStuff by Pur27-2-2005
-- ON   0 OFF
pmregonly 
1;
dlregonly 1;
srregonly 1;

disabledPMChatMsg "unregistered users may not send Private messages"
disabledSearchMsg "unregistered users may not search"
disabledDownloadMsg "unregistered users may not download"

function SearchArrival(curUserData)
  if 
curUser.bRegistered==nil and srregonly==1 then
   curUser
:SendData(""..disabledSearchMsg)
   return 
1;
  
end
end

function ToArrival(curUserData)
  if 
curUser.bRegistered==nil and pmregonly==1 then
   curUser
:SendData(""..disabledPMChatMsg)
   return 
1;
  
end
end


function ConnectToMeArrival(curUserData)
	

  if 
curUser.bRegistered==nil and dlregonly==1 then
   curUser
:SendData(""..disabledDownloadMsg)
   return 
1;
  
end
end
	
	

function 
MultiConnectToMeArrival(curUserData)
  if 
curUser.bRegistered==nil and dlregonly==1 then
   curUser
:SendData(""..disabledDownloadMsg)
   return 
1;
  
end
end
	
	


function 
RevConnectToMeArrival(curUserData)
  if 
curUser.bRegistered==nil and dlregonly==1 then
   curUser
:SendData(""..disabledDownloadMsg)
   return 
1;
  
end
end 

UwV

thanks pur ..
gonna try it straight away ...
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

UwV

Botname = frmHub:GetHubBotName()

function ToArrival(curUser, Data)
if curUser.iProfile == -1 and pmregonly==1 then
        local s,e,who = string.find(Data, "$To:%s+(%S+)%s+From:") 
                if(GetItemByName(who) ~= nil and not GetItemByName(who).bOperator) then
                curUser:SendPM(who, "*** <"..Botname.."> *** has blocked this message.. \r\n\tYou are not regged you can only PM OP's... ") 
                return 1;
               end
        end
end
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

blackwings

#4
Can someone change these functions =
ConnectToMeArrival,  MultiConnectToMeArrival, RevConnectToMeArrival

So that non-regged/normal users can dl from other non-regged/normal users, but still get blocked
when trying to dl from REG, VIP and Ops??


[UK]Madman

I have a d/load blocker by profile at home, will post it wen i get in :o)

SMF spam blocked by CleanTalk