only regged can download
 

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

only regged can download

Started by GanjaMan, 21 October, 2003, 22:36:06

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GanjaMan

greets!

im looking for the script that allowes only regged users to download,
anyone has it?

blessssss
GanjaMan
 

[ES]latinmusic

#1
Here is the link, anyway i think this function must be built in into ptokax or i will finished, with 100 scripts or some bigs ones!!!!.
http://www.1stleg.com/1stleg/Download/Scripts/PtokaX/HubSecure_v1.0.rar

kbeh273300

#2
sorry its to big to past but it can be found here

allso you can find some of the old posts about the script here


-=T-G-T=- network
Network Webpage: www.t-g-t.nl  
Network forum http://tgt.shows.it  
Hub address: houseofkings.no-ip.org
hubwebpage http://houseofkings.uknnet.com/home.html
my hub forum http://kingsforum.uknnet.com/
my LUA forum http://lua.uknnet.com
-=United Kings network=-
Network Webpage?
Hub address: houseofkings.no-ip.org:420
hub webpage
hub forum

GanjaMan

yeah.....thats the one!

but.....
my users are already regged with channelbot, do they have to reg all over to use this script? or is there any other way?

greets :)

GanjaMan

never mind previous post, i took the ANTILEECHER script from your other link and its working great!

thnx :)

[ES]latinmusic

Where is skrosllter?
Does any one can explain me what the hubsecure returns the same message 'sMessageToAliens' 3 times?.
What for?.

[ES]latinmusic


[NL]Pur

QuoteWhere is skrosllter?
Does any one can explain me what the hubsecure returns the same message 'sMessageToAliens' 3 times?.
What for?.
 

what do you mean ?

[ES]latinmusic

QuoteOriginally posted by [NL]Pur what do you mean ?
Look in the second post the link for download hubsecure, i mean why is the reason for this script display the same message (for not registered) 3 times, 2 in main chat and one in pm. 3 times!:
*** Connecting to 172.16.0.5...
*** Connected
 This hub is running PtokaX DC Hub 0.3.3.0 build 15 [debug]  (UpTime: 0 hours, 0 minutes)
 			*** WARNING***
YOU ARE UNABLE TO SEARCH OR DOWNLOAD IN THIS HUB ..... more text.

 Welcome to PtokaX
 Welcome to 

			*** WARNING***
YOU ARE UNABLE TO SEARCH OR DOWNLOAD IN THIS HUB ..... more text.
2 times in main chat, and another pm windows with the same message, the question is why?.

Alexei

-- The fallowing file should be included:
--    HubSecure.lua  -  The main script file
--    PermBan.dat    -  A black list of all MPAA, RIAA, and BSA related ip's
--
-- Default Commands:
--    !RegMe   -  PM Only
--    !RegHelp
--    !Reg
--    !LetLeech   -  Op Only
--
-- Variable Prefixes are:
--    b = Boolean (0 = False, 1 = True)
--    a = Array { }
--    i = Integer
--    s = String


----------------------
-- GLOBAL VARIABLES --  make changes here only
----------------------


-- Global Setup
  sBotName = frmHub:GetHubBotName()
  sHubName = frmHub:GetHubName()
  sHubAddress = "nangiala03.no-ip.com"
  sHubOwner = "[Owner]Alexei"

-- Anti ML Donkey Setup
  bBlockMLDonkey = 0   -- (0 = False, 1 = True)
  bLogMLDonkeyAttempt = 1   -- (0 = False, 1 = True)
  aMLDonkeyDescriptions = { "mldonkey", "mldc client", "Lyon 2003", "dc client" }
  iMLDonkeyAction = 1   -- (0 = Nothing, 1 = Disconnect, 2 = TempBan, 3 = Ban)
  sDisconnectMessage = "You are using unauthorized client software!\r\n"..
                       "Disconnecting..."

-- Anti MediaForce Setup
  bBlockMediaForce = 1   -- (0 = False, 1 = True)
  bLogMediaForceAttempt = 1   -- (0 = False, 1 = True)
  aMediaForceVersions = {"1.0.25"}
  aMediaForceShareAmount = {"18552221398"}
  iMediaForceAction = 2   -- (0 = Nothing, 1 = Disconnect, 2 = TempBan, 3 = Ban)
  sMediaForceFoundMessage = " was a searchbot most likly MediaForce and was temporarily banned. ()"

-- User Registration
  bLogUserRegistration  = 1   -- (0 = False, 1 = True)
  sCmdRegMe = "!RegMe"
  sCmdReg = "!Reg"
  sCmdRegHelp = "!RegHelp"
  sRegistrationProfile = "Reg"
  sRegistrationCompleteMessage = "You are now registered at "..sHubName.."!\r\n"..
                                 "Add this hub to your favourites (if you haven?t done so already), and be sure to write down your account-information and password...\r\n"..
				 "*** Notice You Will Need To Reconnect Before Your Account Becomes Active ***\r\n"..
                                 "HubName:\t"..sHubName.."  Address:\t"..sHubAddress.."\r\n"..
                                 "Your Nick:\t\r\n"..
                                 "Your Password:\t"
  sRegistrationHelpMessage = "By registering to join this hub you agree that you are joining a private network where the rules and policies are created by the network owner.\r\n\r\n"..
                             "You may NOT collect any statistics or log IP addresses for any purpose without explicit permission from the hub owner.\r\n\r\n"..
                             "You may NOT register to enter this hub if you are directly or indirectly affiliated with any law enforcement agency, The MPAA, The RIAA, The BSA or any other related organization.\r\n\r\n"..
                             "You may NOT register to enter this hub if you do not agree to these terms, ANY ATTEMPT TO ACCESS ANY INFORMATION ON THIS SERVER WITHOUT AGREEING TO THESE TERMS WILL BE CONSIDERED A 'HACK' AND VIOLATORS WILL BE PROSECUTED TO THE FULL EXTENT OF THE LAW!\r\n\r\n\r\n"..
	                     "To register or change your password respond to this PM with the command "..sCmdRegMe.." Password where Password is the password you would like for your account."
  sRegistrationError_PMRegOnly = "You may only use the "..sCmdRegMe.." command via PM.  Please type "..sCmdRegHelp.." for help."
  sRegistrationError_NoPassword = "You must provide a password.  Please type "..sCmdRegHelp.." for help."


-- Leech Blocker
  bBlockSearches = 1   -- (0 = False, 1 = True)
  aBlockSearchExceptions = { }
  aToBlock = { "^$ConnectToMe%s(%S+)", "^$RevConnectToMe%s(%S+)", "^$Search%s+(%S+)"}
  aLetLeech = { "zSearch[moglo]", "7www.glosearch.tk" }  -- This is an array of nicks that are exempt like search bots.
  sCmdLetLeech = "!LetLeech"
  sWelcomeMessage = "Welcome to "..sHubName.."\r\n\r\n"
  sMessageToAliens = "\t\t\t*** WARNING***\r\n"..
                     "YOU ARE UNABLE TO SEARCH OR DOWNLOAD IN THIS HUB\r\n"..
                     "This hub will only accept search and download requests from registered users to prevent any unauthorized users such as but not limited to members of the MPAA, RIAA, and BSA from gathering information from our users.  Please register your User Name as soon as possible by sending a pm to "..sBotName.." with the command "..sCmdRegHelp.." or by typing /msg "..sBotName.." "..sCmdRegHelp.." in the main chat window and follow the instructions that are sent to you.\r\n\r\n"..
                     "I am sorry for the inconvenience but by taking this step we are ensuring that our users are safe from the prying eyes of these individuals.\r\n\r\n"..
                     "Thank You\r\n-"..sHubOwner.."\r\n\r\n"..
                     "This Annoying Message Will Stop After You Register Your Nick."
  sMessageToRegNicks = "This hub will only accept search and download requests from registered users to prevent any unauthorized users such as but not limited to members of the MPAA, RIAA, and BSA from gathering information from our users.\r\n\r\n"..
                       "I am sorry for the inconvenience but by taking this step we are ensuring that our users are safe from the prying eyes of these individuals.\r\n\r\n"..
                       "Thank You\r\n-"..sHubOwner
  sMessageNotifyLeech = "You are now authorized to download for this session."
  sMessageNotifyOp = "The user  has been granted a special leech license."
  sLeechError_UserIsReg = "The user  is already registered."
  sLeechError_NoUserName = "You must provide a Nick to grant leech access to."
  sLeechError_UserOffilne = "The user  is not currently online."


----------------------------------
-- Do not change anything below --
----------------------------------


function Main()
	frmHub:EnableFullData(1)
	frmHub:UnregBot(sBotName)
	frmHub:RegBot(sBotName)
	
	if bBlockSearches == 0 then
		for i,v in aToBlock do
			if v == "^$Search%s+(%S+)" then aToBlock[i] = nil end
		end
	end
end


function NewUserConnected(curUser)
	if bBlockMLDonkey == 1 then
		-- Anti ML Donkey
		for key,checkWord in aMLDonkeyDescriptions do
			if strfind(curUser.sMyInfoString, checkWord, 1, 1) then
				if bLogMLDonkeyAttempt == 1 then
					AppendFile("../Logs/MLDonkeyBot_"..date("%m-%d-%y")..".txt", curUser.sName.." ("..curUser.sIP..") was detected as a MLDonkey Client.  Version: "..curUser.iVersion.." MyInfo: "..curUser.sMyInfoString)
				end
				
				curUser:SendData(sBotName, sDisconnectMessage)
				
				if iMLDonkeyAction == 1 then
					curUser:Disconnect()
				elseif iMLDonkeyAction == 2 then
					curUser:TempBan()
				elseif iMLDonkeyAction == 3 then
					curUser:Ban()
				else
					-- Do Nothing
				end
			end
		end
	end
	
	if bBlockMediaForce == 1 then
		-- Anti MediaForce
		local foundMediaForce = 0

		for key,checkWord in aMediaForceVersions do
			if strfind(curUser.iVersion, checkWord, 1, 1) then
				foundMediaForce = 1
			end 
		end
		
		if foundMediaForce == 0 then
			for key,checkWord in aMediaForceShareAmount do
				if strfind(curUser.sMyInfoString, checkWord, 1, 1) then
					foundMediaForce = 1
				end 
			end
		end

		if foundMediaForce ~= 0 then
			SendToAll (sBotName, gsub(gsub(sMediaForceFoundMessage, "", curUser.sName), "", curUser.sIP))
			if bLogMediaForceAttempt == 1 then
				AppendFile("../Logs/MediaforceBot_"..date("%m-%d-%y")..".txt", curUser.sName.." ("..curUser.sIP..") was detected as a Mediaforce Bot.  Version: "..curUser.iVersion.." MyInfo: "..curUser.sMyInfoString)
			end
			
			curUser:SendData(sBotName, sMediaForceFoundMessage)
			
			if iMediaForceAction == 1 then
				curUser:Disconnect()
			elseif iMediaForceAction == 2 then
				curUser:TempBan()
			elseif iMediaForceAction == 3 then
				curUser:Ban()
			else
				-- Do Nothing
			end
		end
	end

	if curUser.iProfile == -1 then
		curUser:SendData(sBotName, sWelcomeMessage..sMessageToAliens)
	else
		curUser:SendData(sBotName, sWelcomeMessage..sMessageToRegNicks)
	end
end


function OpConnected(curUser)
	curUser:SendData(sBotName, sWelcomeMessage..sMessageToRegNicks)
end


function DataArrival(curUser, sData)
	-- if Chat Cmd
	if strsub(sData, 1, 1) == "<" then
		local s, e, cmd, arg1 = strfind(sData, "%b<>%s+(%S+)%s*([^|]*)%|$")
		
		if not cmd == nil then
			if strlower(cmd) == strlower(sCmdRegMe) then
				curUser:SendData(sBotName, sRegistrationError_PMRegOnly)
				return 1
			elseif strlower(cmd) == strlower(sCmdReg) or strlower(cmd) == strlower(sCmdRegHelp) then
				curUser:SendPM(sBotName, sRegistrationHelpMessage)
				return 1
			elseif strlower(cmd) == strlower(sCmdLetLeech) and curUser.bOperator then
				if not arg1 == nil and arg1 ~= "" then
					who = GetItemByName(arg1)
					
					if not who then
						curUser:SendData(sBotName, gsub(sLeechError_UserOffilne, "", arg1))
					elseif who.iProfile ~= -1 then
						curUser:SendData(sBotName, gsub(sLeechError_UserIsReg, "", arg1))
					else
						LetLeech[arg] = 1
						curUser:SendData(sBotName, gsub(sMessageNotifyOp, "", arg1))
						who:SendData(sBotName, sMessageNotifyLeech)
					end
				else
					curUser:SendData(sBotName, sLeechError_NoUserName)
				end
				
				return 1
			end
		end

	end

	-- if PM Cmd
	if strsub(sData, 1, 5) == "$To: " then
		local s, e, whoTo, from = strfind(sData, "$To:%s+(%S+)%s+From:%s+(%S+)")

		if whoTo == sBotName then
			local s, e, cmd, arg1 = strfind(sData, "%b<>%s+(%S+)%s*([^|]*)%|$")
			

			if not cmd == nil then
				if strlower(cmd) == strlower(sCmdReg) or strlower(cmd) == strlower(sCmdRegHelp) then
					curUser:SendPM(sBotName, sRegistrationHelpMessage)
				elseif strlower(cmd) == strlower(sCmdRegMe) then
					if arg1 == nil or arg1 == "" then
						curUser:SendPM(sBotName, sRegistrationError_NoPassword)
					else
						if curUser.iProfile == -1 then
							-- New User
							AddRegUser(curUser.sName, arg1, GetProfileIdx(sRegistrationProfile))
						else
							-- Change Password
							AddRegUser(curUser.sName, arg1, curUser.iProfile)
						end
						
						curUser:SendPM(sBotName, ""..gsub(gsub(sRegistrationCompleteMessage, "", curUser.sName), "", arg1))
					end
				end
			end
			
			return 1
		end

	end


	-- Annoying message to send to users that havnt registered!
	if strsub(strlower(sData), 1, 7) == strlower("$MyINFO") then
		if (curUser.iProfile == -1) then
			curUser:SendPM(sBotName, sMessageToAliens)
			curUser:SendData(sBotName, sMessageToAliens)
		end
		
		return 1
	end

	-- See if data should be blocked:
	for _,blockstring in aToBlock do
		local _, _, who = strfind(sData, blockstring)
		if who then return smBlock(curUser, sData, who) end
	end

end


----------------------------
-- User Defined Functions --
----------------------------


function AppendFile(sFilePath, sData)
	appendto(sFilePath)
		write(sData.."\r\n")
	writeto()
end


function smBlock(user, data, who)
	local report
	local profnam = GetProfileName(user.iProfile)
	if profnam then
		profnam = strlower(profnam)
	else
		profnam = "alien"
	end
	-- Activity by Masters, OPs, VIPs and REGs are just reported to OPs:
	-- Also, searches pass if they are in the exception list:
	-- Data also passes if user is in LetLeech list:
	if (user.iProfile ~= -1) or smMatchException(data) or IsInLeechList(user) then
		report = "\t"..user.sName.." ("..profnam..") sends:\r\n\t"..data
		return nil
	end
	-- Alien (not registered) users get blocked:
	local report = "\tBlocked from "..user.sName.." ("..profnam.."):\r\n\t"..data
	return 1
end


function smMatchException(data)
	if strfind (data, "^$Search%s+(%S+)") then
		for _,exceptword in aBlockSearchExceptions do
			if strfind (strlower(data), strlower(exceptword)) then
				return 1
			end
		end
	end
	return nil
end


function IsInLeechList(user)
	for i,v in aLetLeech do
		if i == user.sName then return 1 end
	end
	return nil
end


function SendDebug(sData)
	SendPmToNick(sHubOwner, "Debug", sData)
	return 1
end

[ES]latinmusic

Yes, this one is the script and?

[ES]latinmusic

No answers yet?. The old board was more faster helping people  ;(
Does any one could help me here?. I'm trying to modify this script to make two little versions, exactly i'm removing some code, the problem is when a user connect into a hub he is getting 3 messages with the same text and i don't know if there are a good reason for this or is only a wrong implementation. I agree with 2 messages, one in pm and one in main could be usefull because some options presents into dc++ advanced settings, but the third for what?. Think in this way we are flooding the hub. The code related into this is:
if curUser.iProfile == -1 then
		curUser:SendData(sBotName, sWelcomeMessage..sMessageToAliens)
	else
		curUser:SendData(sBotName, sWelcomeMessage..sMessageToRegNicks)
	end
if strsub(strlower(sData), 1, 7) == strlower("$MyINFO") then
		if (curUser.iProfile == -1) then
			curUser:SendPM(sBotName, sMessageToAliens)
 			curUser:SendData(sBotName, sMessageToAliens)
		end
		
		return 1
	end
I think this is wrong. Some ideas people
*************
For Ptacek.
The bug related to pm messages i commented you before, if you are using this script becomes critical, instead you have one message in pm and one in main, you have the two on main. Note: The bug is ramdom, in first connection message in displayed in PM, after that, i don't remember exactly what i did, both message are displayed into main, no way to avoid settings into dc. I not see any sense for display the same message twice into the same place  X(
*************

raz

r u sure you don't have 2 or 3 of the same scripts with different names or somefink cause dat happens alot. :D

[ES]latinmusic

QuoteOriginally posted by raz
r u sure you don't have 2 or 3 of the same scripts with different names or somefink cause dat happens alot. :D
Totally sure, only this one, i'm rewriting/modifying scripts now using the last beta. I start scripting, when finished, i move it to a folder called scriptstested and start with a new one, the real server is running TD4 on different port.
In this way all i safe to put it into the real server and ocassionally catch a bug into Ptokax, althougth i have not started full tests on Ptokax, i'm waiting 2 or 3 betas more to place the beta into the real sever with the new scripts.

SaintSinner

QuoteOriginally posted by [ES]latinmusic
No answers yet?. The old board was more faster helping people  ;(


the old board also had 3000 people
more people=more help
   


[ES]latinmusic

Totally true this one  :(

Skrollster

sorry for not replying, but i have ignored this thread because i thought the problem was solved..

I'll check in tomorow/today to see if it can be fixed and what the reason is....

[NL]Pur

in the main function

frmHub:UnregBot(sBotName)
frmHub:RegBot(sBotName)

this is giving the problems that SendPM is displayed in the main.

this should be enough

frmHub:RegBot(sBotName)


and the other two are from SendData
if u use SendData is always displayed in the main.

as latinmusic already pointed out there two SendData used and one SendPM


ps.

 what happend with the width of this thread ?

[ES]latinmusic

Great, many thanks pur and skrollster to answer, and the rest of people in board too.
Pur i'm going to test what you have explain me, and both if you if possible take a look into the code to see if is possible to re-arrange a little the code to diplay only 2 messages instead 3. My english is no good but i will try to explain what i mean to see if you can catch the problem, if not ask here and i will explain till you understand it well.
What we have here?.
We have 2 differents points: The client is connecting to a server or the client is already connected to the server.
In the script we have 2 functions:
.- function NewUserConnected (): send the allien message on new user connected
.- function DataArrival (): send the allien message twice, one in pm and one in main.
The total amount of messages is equal to 3 in the case: client is connecting to the server. Reason: On connect the 2 functions are executed, function NewUserConnected () and function DataArrival ().
What we need?: We need when a client is connecting send the message ONLY twice, one in main and one in pm, then when client is (already) connected, if the user start searching or try to download, DataArrival () is fired and we will displayed the allien message again twice, one in pm and one in main chat.
Is easy to add a line for sending the message into NewUserConnected () to display the message into PM too when a user connect to the hub, but in this case, when a user connect for first time, he will recieved the message 4 time, in larger hubs, the amount of data tranfer could be very big. The problem remains only when a client is connecting because the 2 functions are fired. I think could be fixed adding a checking variable and calling the allien message inside another function, but i not good coding.
What about?.
Note: The message in main and in pm are cool because the user can have activated some options related to the messages from bots into settings of the client.

[ES]latinmusic

#19
Just maintainng this topic alive, still need help here  :rolleyes:

[ES]latinmusic

A little help here please. skrollster, pur, ptacek, phaty, tezlo, anyone please?.

tezlo

script sends the msg on Connect and on every $MyINFO
so yes.. unregged users get three of em when entering the hub
youre safe getting rid of the latter..
if strsub(strlower(sData), 1, 7) == strlower("$MyINFO") then
		if (curUser.iProfile == -1) then
			curUser:SendPM(sBotName, sMessageToAliens)
			curUser:SendData(sBotName, sMessageToAliens)
		end
		
		return 1
	end

[ES]latinmusic

Thanks! finally i can implement this one, thanks again  :P

raz

i have changed it so its only 2 msgs. 1 thing is dat u don't always recieve it in pm, but u do half of the time. the other half u recieve it on main.u won't get 3 msgs now like b4. :D

-- The fallowing file should be included:
--    HubSecure.lua  -  The main script file
--    PermBan.dat    -  A black list of all MPAA, RIAA, and BSA related ip's
--
-- Default Commands:
--    !RegMe   -  PM Only
--    !RegHelp
--    !Reg
--    !LetLeech   -  Op Only
--
-- Variable Prefixes are:
--    b = Boolean (0 = False, 1 = True)
--    a = Array { }
--    i = Integer
--    s = String


----------------------
-- GLOBAL VARIABLES --  make changes here only
----------------------


-- Global Setup
  sBotName = frmHub:GetHubBotName()
  sHubName = frmHub:GetHubName()
  sHubAddress = "nangiala03.no-ip.com"
  sHubOwner = "[Owner]Alexei"

-- Anti ML Donkey Setup
  bBlockMLDonkey = 0   -- (0 = False, 1 = True)
  bLogMLDonkeyAttempt = 1   -- (0 = False, 1 = True)
  aMLDonkeyDescriptions = { "mldonkey", "mldc client", "Lyon 2003", "dc client" }
  iMLDonkeyAction = 1   -- (0 = Nothing, 1 = Disconnect, 2 = TempBan, 3 = Ban)
  sDisconnectMessage = "You are using unauthorized client software!\r\n"..
                       "Disconnecting..."

-- Anti MediaForce Setup
  bBlockMediaForce = 1   -- (0 = False, 1 = True)
  bLogMediaForceAttempt = 1   -- (0 = False, 1 = True)
  aMediaForceVersions = {"1.0.25"}
  aMediaForceShareAmount = {"18552221398"}
  iMediaForceAction = 2   -- (0 = Nothing, 1 = Disconnect, 2 = TempBan, 3 = Ban)
  sMediaForceFoundMessage = " was a searchbot most likly MediaForce and was temporarily banned. ()"

-- User Registration
  bLogUserRegistration  = 1   -- (0 = False, 1 = True)
  sCmdRegMe = "!RegMe"
  sCmdReg = "!Reg"
  sCmdRegHelp = "!RegHelp"
  sRegistrationProfile = "Reg"
  sRegistrationCompleteMessage = "You are now registered at "..sHubName.."!\r\n"..
                                 "Add this hub to your favourites (if you haven?t done so already), and be sure to write down your account-information and password...\r\n"..
				 "*** Notice You Will Need To Reconnect Before Your Account Becomes Active ***\r\n"..
                                 "HubName:\t"..sHubName.."  Address:\t"..sHubAddress.."\r\n"..
                                 "Your Nick:\t\r\n"..
                                 "Your Password:\t"
  sRegistrationHelpMessage = "By registering to join this hub you agree that you are joining a private network where the rules and policies are created by the network owner.\r\n\r\n"..
                             "You may NOT collect any statistics or log IP addresses for any purpose without explicit permission from the hub owner.\r\n\r\n"..
                             "You may NOT register to enter this hub if you are directly or indirectly affiliated with any law enforcement agency, The MPAA, The RIAA, The BSA or any other related organization.\r\n\r\n"..
                             "You may NOT register to enter this hub if you do not agree to these terms, ANY ATTEMPT TO ACCESS ANY INFORMATION ON THIS SERVER WITHOUT AGREEING TO THESE TERMS WILL BE CONSIDERED A 'HACK' AND VIOLATORS WILL BE PROSECUTED TO THE FULL EXTENT OF THE LAW!\r\n\r\n\r\n"..
	                     "To register or change your password respond to this PM with the command "..sCmdRegMe.." Password where Password is the password you would like for your account."
  sRegistrationError_PMRegOnly = "You may only use the "..sCmdRegMe.." command via PM.  Please type "..sCmdRegHelp.." for help."
  sRegistrationError_NoPassword = "You must provide a password.  Please type "..sCmdRegHelp.." for help."


-- Leech Blocker
  bBlockSearches = 1   -- (0 = False, 1 = True)
  aBlockSearchExceptions = { }
  aToBlock = { "^$ConnectToMe%s(%S+)", "^$RevConnectToMe%s(%S+)", "^$Search%s+(%S+)"}
  aLetLeech = { "zSearch[moglo]", "7www.glosearch.tk" }  -- This is an array of nicks that are exempt like search bots.
  sCmdLetLeech = "!LetLeech"
  sWelcomeMessage = "Welcome to "..sHubName.."\r\n\r\n"
  sMessageToAliens = "\t\t\t*** WARNING***\r\n"..
                     "YOU ARE UNABLE TO SEARCH OR DOWNLOAD IN THIS HUB\r\n"..
                     "This hub will only accept search and download requests from registered users to prevent any unauthorized users such as but not limited to members of the MPAA, RIAA, and BSA from gathering information from our users.  Please register your User Name as soon as possible by sending a pm to "..sBotName.." with the command "..sCmdRegHelp.." or by typing /msg "..sBotName.." "..sCmdRegHelp.." in the main chat window and follow the instructions that are sent to you.\r\n\r\n"..
                     "I am sorry for the inconvenience but by taking this step we are ensuring that our users are safe from the prying eyes of these individuals.\r\n\r\n"..
                     "Thank You\r\n-"..sHubOwner.."\r\n\r\n"..
                     "This Annoying Message Will Stop After You Register Your Nick."
  sMessageToRegNicks = "This hub will only accept search and download requests from registered users to prevent any unauthorized users such as but not limited to members of the MPAA, RIAA, and BSA from gathering information from our users.\r\n\r\n"..
                       "I am sorry for the inconvenience but by taking this step we are ensuring that our users are safe from the prying eyes of these individuals.\r\n\r\n"..
                       "Thank You\r\n-"..sHubOwner
  sMessageNotifyLeech = "You are now authorized to download for this session."
  sMessageNotifyOp = "The user  has been granted a special leech license."
  sLeechError_UserIsReg = "The user  is already registered."
  sLeechError_NoUserName = "You must provide a Nick to grant leech access to."
  sLeechError_UserOffilne = "The user  is not currently online."


----------------------------------
-- Do not change anything below --
----------------------------------


function Main()
	frmHub:RegBot(sBotName)
	
	if bBlockSearches == 0 then
		for i,v in aToBlock do
			if v == "^$Search%s+(%S+)" then aToBlock[i] = nil end
		end
	end
end


function NewUserConnected(curUser)
	if bBlockMLDonkey == 1 then
		-- Anti ML Donkey
		for key,checkWord in aMLDonkeyDescriptions do
			if strfind(curUser.sMyInfoString, checkWord, 1, 1) then
				if bLogMLDonkeyAttempt == 1 then
					AppendFile("../Logs/MLDonkeyBot_"..date("%m-%d-%y")..".txt", curUser.sName.." ("..curUser.sIP..") was detected as a MLDonkey Client.  Version: "..curUser.iVersion.." MyInfo: "..curUser.sMyInfoString)
				end
				
				curUser:SendData(sBotName, sDisconnectMessage)
				
				if iMLDonkeyAction == 1 then
					curUser:Disconnect()
				elseif iMLDonkeyAction == 2 then
					curUser:TempBan()
				elseif iMLDonkeyAction == 3 then
					curUser:Ban()
				else
					-- Do Nothing
				end
			end
		end
	end
	
	if bBlockMediaForce == 1 then
		-- Anti MediaForce
		local foundMediaForce = 0

		for key,checkWord in aMediaForceVersions do
			if strfind(curUser.iVersion, checkWord, 1, 1) then
				foundMediaForce = 1
			end 
		end
		
		if foundMediaForce == 0 then
			for key,checkWord in aMediaForceShareAmount do
				if strfind(curUser.sMyInfoString, checkWord, 1, 1) then
					foundMediaForce = 1
				end 
			end
		end

		if foundMediaForce ~= 0 then
			SendToAll (sBotName, gsub(gsub(sMediaForceFoundMessage, "", curUser.sName), "", curUser.sIP))
			if bLogMediaForceAttempt == 1 then
				AppendFile("../Logs/MediaforceBot_"..date("%m-%d-%y")..".txt", curUser.sName.." ("..curUser.sIP..") was detected as a Mediaforce Bot.  Version: "..curUser.iVersion.." MyInfo: "..curUser.sMyInfoString)
			end
			
			curUser:SendData(sBotName, sMediaForceFoundMessage)
			
			if iMediaForceAction == 1 then
				curUser:Disconnect()
			elseif iMediaForceAction == 2 then
				curUser:TempBan()
			elseif iMediaForceAction == 3 then
				curUser:Ban()
			else
				-- Do Nothing
			end
		end
	end

	if curUser.iProfile == -1 then
		curUser:SendData(sBotName, sWelcomeMessage..sMessageToAliens)
	else
		curUser:SendData(sBotName, sWelcomeMessage..sMessageToRegNicks)
end
		curUser:SendPM(sBotName, sWelcomeMessage..sMessageToAliens)
end


function OpConnected(curUser)
	curUser:SendData(sBotName, sWelcomeMessage..sMessageToRegNicks)
end

function DataArrival(curUser, sData)
	-- if Chat Cmd
	if strsub(sData, 1, 1) == "<" then
		local s, e, cmd, arg1 = strfind(sData, "%b<>%s+(%S+)%s*([^|]*)%|$")
		
		if not cmd == nil then
			if strlower(cmd) == strlower(sCmdRegMe) then
				curUser:SendData(sBotName, sRegistrationError_PMRegOnly)
				return 1
			elseif strlower(cmd) == strlower(sCmdReg) or strlower(cmd) == strlower(sCmdRegHelp) then
				curUser:SendPM(sBotName, sRegistrationHelpMessage)
				return 1
			elseif strlower(cmd) == strlower(sCmdLetLeech) and curUser.bOperator then
				if not arg1 == nil and arg1 ~= "" then
					who = GetItemByName(arg1)
					
					if not who then
						curUser:SendData(sBotName, gsub(sLeechError_UserOffilne, "", arg1))
					elseif who.iProfile ~= -1 then
						curUser:SendData(sBotName, gsub(sLeechError_UserIsReg, "", arg1))
					else
						LetLeech[arg] = 1
						curUser:SendData(sBotName, gsub(sMessageNotifyOp, "", arg1))
						who:SendData(sBotName, sMessageNotifyLeech)
					end
				else
					curUser:SendData(sBotName, sLeechError_NoUserName)
				end
				
				return 1
			end
		end

	end

	-- if PM Cmd
	if strsub(sData, 1, 5) == "$To: " then
		local s, e, whoTo, from = strfind(sData, "$To:%s+(%S+)%s+From:%s+(%S+)")

		if whoTo == sBotName then
			local s, e, cmd, arg1 = strfind(sData, "%b<>%s+(%S+)%s*([^|]*)%|$")
			

			if not cmd == nil then
				if strlower(cmd) == strlower(sCmdReg) or strlower(cmd) == strlower(sCmdRegHelp) then
					curUser:SendPM(sBotName, sRegistrationHelpMessage)
				elseif strlower(cmd) == strlower(sCmdRegMe) then
					if arg1 == nil or arg1 == "" then
						curUser:SendPM(sBotName, sRegistrationError_NoPassword)
					else
						if curUser.iProfile == -1 then
							-- New User
							AddRegUser(curUser.sName, arg1, GetProfileIdx(sRegistrationProfile))
						else
							-- Change Password
							AddRegUser(curUser.sName, arg1, curUser.iProfile)
						end
						
						curUser:SendPM(sBotName, ""..gsub(gsub(sRegistrationCompleteMessage, "", curUser.sName), "", arg1))
					end
				end
			end
			
			return 1
		end

	end
end
----------------------------
-- User Defined Functions --
----------------------------


function AppendFile(sFilePath, sData)
	appendto(sFilePath)
		write(sData.."\r\n")
	writeto()
end


function smBlock(user, data, who)
	local report
	local profnam = GetProfileName(user.iProfile)
	if profnam then
		profnam = strlower(profnam)
	else
		profnam = "alien"
	end
	-- Activity by Masters, OPs, VIPs and REGs are just reported to OPs:
	-- Also, searches pass if they are in the exception list:
	-- Data also passes if user is in LetLeech list:
	if (user.iProfile ~= -1) or smMatchException(data) or IsInLeechList(user) then
		report = "\t"..user.sName.." ("..profnam..") sends:\r\n\t"..data
		return nil
	end
	-- Alien (not registered) users get blocked:
	local report = "\tBlocked from "..user.sName.." ("..profnam.."):\r\n\t"..data
	return 1
end


function smMatchException(data)
	if strfind (data, "^$Search%s+(%S+)") then
		for _,exceptword in aBlockSearchExceptions do
			if strfind (strlower(data), strlower(exceptword)) then
				return 1
			end
		end
	end
	return nil
end


function IsInLeechList(user)
	for i,v in aLetLeech do
		if i == user.sName then return 1 end
	end
	return nil
end


function SendDebug(sData)
	SendPmToNick(sHubOwner, "Debug", sData)
	return 1
end

[ES]latinmusic

Does any one have noted that the Sid script, the one posted on the web and without any modification, generate the following message into ptokax script editor if you are operator or hubmaster?:

Syntax Error: attempt to index global `user' (a nil value)

Could anyone help me to fix this?, really need help here.

SMF spam blocked by CleanTalk