IP spam blocker
 

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

IP spam blocker

Started by enema, 19 November, 2004, 10:05:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

enema

As you probably noticed, In past few days Ive been searching for ways, how to block spammers who posts IP addresses... I didnt found any script, that could do the job, so I created my own... Only problem is,that this creation of mine eats f*ckin lot of memory (almost as much as RoboCop)... If there are soul in this forum, that could fix that and keep or even upgrade bots efficiency, please do it!

this is my creation

blackwings

#1
well, I tried and failed making the idea that I had to make you script faster.

Why not modify a IP range blocker and mix it together with your script. then you can simple add that it should look for =
0.0.0.0-255.255.255.255


enema

havent thoght about that. what I tried to do looks something like this:
trigs =  { "..a.."."..b.."}

a = "60.","61.", etc...
b = "1", "2", "3"

also i tried to make script read triggers from file, but it disconnected me every time when I posted "1" in chat instead of real IP

Maybe you can use one of my ideas? Thing is, that I dont really know lua... when I make a script, its usually is a remake of another scripts.... I look and I learn, thats what I say... Too bad its not so simple as it sounds...

One of main reason, why I want this script is because many ppl in my country doesnt even know how to create an own domain, but they still think, that they could be better hub owners than anyone else...

blackwings

#3
I don't think this work(yes I'm a huge lua newbie and I have amazingly allot more to learn >_< ),
but maybe it will give someone else a idea how to solve this =
botname = "blocker"

a=(%d)
b=(%d)
c=(%d)
d=(%d)

iprange = ..a.."."..b.."."..c.."."..d..

function DataArrival(user, data) 
	if not user.bOperator then
		if( strfind(data, iprange,1,1)) then
			if (a >= 0) and (a <= 255)
				if (b >= 0) and (b <= 255)
					if (c >= 0) and (c <= 255)
						if (c >= 0) and (c <= 255)
							SendPmToOps(botname, user.sName.." has been kicked because of advertising. His IP was "..user.sIP.." and he has been kicked because of word '"..key.."'")
							SendToAll(botname, user.sName.." has been kicked because of Advertising.") 
							user:TempBan() 
						end
					end
				end
			end	
		end
	end
end


SMF spam blocked by CleanTalk