Leech Bot by jiten
 

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

Leech Bot by jiten

Started by pulsar, 27 March, 2007, 03:30:13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pulsar

Leech Bot, Lua5  (thread: http://forum.ptokax.org/index.php?topic=4034.0)  <- closed thread
hi@all, good work, a very meaningful script! but it shows me a small error on line 62:

LeechBot-by.jiten.lua:62: attempt to index a nil value  ???

all my efforts to eliminate this error failed  ::)
Hubsoft: 0.3.5.1 LUA5

blastbeat

Hi

i have the same problem, same hubsoft and no solution too...


bastya_elvtars

Line 62 is
Code: lua
user:SendData(sBot,"*** Error: You are not authorized to download from "..nick..".")

I don't see any error-source.
Everything could have been anything else and it would have just as much meaning.

pulsar

oh sry, i've forgotten i have 2 profiles more  ::)
the error are on line 60

bastya_elvtars

K, the problem must be that the CTM goes to an offline user somehow. Try to replace the CTMArrival to this:
Code: lua
CTMArrival = function(user,data)
	local usr=GetItemByName(nick); if not usr then return end
	local sFind
	if string.sub(data,1,4) == "$Rev" then sFind = "(%S+)|$" elseif string.sub(data,1,4) == "$Con" then sFind = "%S+%s+(%S+)" end
	local s,e,nick = string.find(data,sFind)
	-- (user is blocked and can't download? OR user's profile can download from nick's? OR nick is blocked and can't upload?) AND (can immune user download from blocked nick?)
	if (tBlocked[string.lower(user.sName)] or tIdxBlocked[user.iProfile][usr.iProfile] == 1 or tBlocked[string.lower(nick)]) then
		if not (tImmune[string.lower(usr.sName)] and tImmune[string.lower(usr.sName)][string.lower(user.sName)]) then
			user:SendData(sBot,"*** Error: You are not authorized to download from "..nick..".")
			return 1
		end
	end
end
Everything could have been anything else and it would have just as much meaning.

pulsar

perfect! good job, big thx bastya  :)

SMF spam blocked by CleanTalk