PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: UwV on 27 February, 2005, 03:19:24

Title: search. dl and pm blockeer for non regged ?
Post by: UwV on 27 February, 2005, 03:19:24
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  ;)
Title:
Post by: [NL]Pur on 27 February, 2005, 14:39:19
this should work ;)


-- disableStuff by Pur, 27-2-2005
-- 1 = 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(curUser, Data)
  if curUser.bRegistered==nil and srregonly==1 then
   curUser:SendData(""..disabledSearchMsg)
   return 1;
  end
end

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


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

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

function RevConnectToMeArrival(curUser, Data)
  if curUser.bRegistered==nil and dlregonly==1 then
   curUser:SendData(""..disabledDownloadMsg)
   return 1;
  end
end
Title:
Post by: UwV on 27 February, 2005, 15:30:44
thanks pur ..
gonna try it straight away ...
Title: changed this ..
Post by: UwV on 03 March, 2005, 01:40:06
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
Title:
Post by: blackwings on 03 March, 2005, 01:54:33
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??
Title:
Post by: [UK]Madman on 03 March, 2005, 16:39:58
I have a d/load blocker by profile at home, will post it wen i get in :o)