Lucifer-Error
 

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

Lucifer-Error

Started by B@B?, 13 June, 2005, 10:51:44

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

B@B?

Hello again... ;)

I have a prob with "Lucifer"...

This appears:

Lucifer.lua:133: attempt to index local `nick' (a nil value)

Must i post the whole script for that or can someone tell
me, what?s the matter with it?

ToArrival = function(user, data)
	local data = string.sub(data,1,-2) 
	if not user.bOperator then
		local _, _, to, from, msg = string.find(data, "^%$To:%s+(%S+)%s+From:%s+(%S+)%s-%$%b<>%s+(.*)")
		local nick = GetItemByName(to)
		if to ~= BotName then
			if not nick.bOperator then
				local userdata = to.." "..from [COLOR=red]-- THIS IS LINE 133...[/COLOR] 
				if adCheck(msg) ~= nil and Verify(user.sName, msg) then
					tabAdvert[userdata] = nil
					local action = DoDisc(user,msg,line)
					s,e,whoTo,from,mes = string.find(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  
					SendPmToOps (BotName, "User "..user.sName.." mit IP "..user.sIP.." >>> "..action.." wegen Werbung an "..whoTo.." >>> : "..mes.."")
					return 1
				end
				for key, value in controltrigs do
					if( string.find( string.lower(data), key) ) then
						s,e,whoTo,from,mes = string.find(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  
						SendPmToOps (BotName, "Control: User "..user.sName.." mit IP "..user.sIP.." schrieb an "..whoTo.." >>> : "..mes.."")
					end
				end

Tha Hanks  :P
THE DAY AFTER...  

...is >>>>>>>> NOW!




Btw:
Plz excuse my english...
It?s not the best, i?m sure...but it?s funny...isn?t it?

jiten

Hi there. I've already fixed it.
Change your ToArrival function to this or copy the whole script from the Lucifer 6.6.6 thread:
ToArrival = function(user, data)
	local data = string.sub(data,1,-2) 
	if not user.bOperator then
		local _, _, to, from, msg = string.find(data, "^%$To:%s+(%S+)%s+From:%s+(%S+)%s-%$%b<>%s+(.*)")
		if GetItemByName(to) then
			local nick = GetItemByName(to)
			if not nick.bOperator then
				local userdata = to.." "..from
				if adCheck(msg) ~= nil and Verify(user.sName, msg) then
					tabAdvert[userdata] = nil
					local action = DoDisc(user,msg,line)
					s,e,whoTo,from,mes = string.find(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  
					SendPmToOps (BotName, "User "..user.sName.." with IP "..user.sIP.." is "..action.." for advertising to "..whoTo.." this: "..mes.."")
					return 1
				end
				for key, value in controltrigs do
					if( string.find( string.lower(data), key) ) then
						s,e,whoTo,from,mes = string.find(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  
						SendPmToOps (BotName, "Control: User "..user.sName.." with IP "..user.sIP.." said to "..whoTo.." this: "..mes.."")
					end
				end
				spam=0
				if( string.find( string.lower(data), "no",1,1) ) and ( string.find( string.lower(data), "ip.",1,1) ) then
					if ( string.find( string.lower(data), "com",1,1) ) or ( string.find( string.lower(data), "org",1,1) ) or ( string.find( string.lower(data), "info",1,1) ) then
						spam=spam+1;
					end;
				end;
				if( string.find( string.lower(data), "dns",1,1) ) and ( string.find( string.lower(data), "2",1,1) ) and ( string.find( string.lower(data), "go",1,1) ) then
					spam=spam+1;
				end
				if( string.find( string.lower(data), "dy",1,1) ) and ( string.find( string.lower(data), "nu",1,1) ) then
					if( string.find( string.lower(data), ".net",1,1) ) or ( string.find( string.lower(data), ".com",1,1) ) then
						spam=spam+1;
					end;
				end
				if( string.find( string.lower(data), "d n s a",1,1) ) or ( string.find( string.lower(data), "d n s .",1,1) ) or ( string.find( string.lower(data), "d n s 2",1,1) ) or ( string.find( string.lower(data), "o d s .",1,1) ) or ( string.find( string.lower(data), "d y n",1,1) ) then
					spam=spam+1;
				end
			end
		end
	end
end
Cheers

B@B?

#2
Uiiiiiiiii!

I?ll copy this!  :D

Thank YOU! @ jiten 4 speed... :P

NOW integrated...seems fine workin...

If not, i tell it 2 U.  ;)
THE DAY AFTER...  

...is >>>>>>>> NOW!




Btw:
Plz excuse my english...
It?s not the best, i?m sure...but it?s funny...isn?t it?

jiten

QuoteOriginally posted by B@B?
Uiiiiiiiii!

I?ll copy this!  :D

Thank YOU! @ jiten 4 speed... :P

NOW integrated...seems fine workin...

If not, i tell it 2 U.  ;)
No problem :]

B@B?

...and so i?m waitin 4 someone 2 KICK! *ggg*  :D

Uuuuuuuuuhhhh, i?m a lazybone...chrchr  :P
THE DAY AFTER...  

...is >>>>>>>> NOW!




Btw:
Plz excuse my english...
It?s not the best, i?m sure...but it?s funny...isn?t it?

SMF spam blocked by CleanTalk