deflood
 

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

deflood

Started by Kastor, 23 April, 2007, 21:02:47

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kastor

this script can be traslate or is too much difficult ????   :P

thanks



--=====================================
-- Flood e spam ban
---------------------------------------
-- version: 1.2 (06.2.2003)
-- author: DirtyFinger
-- email: DirtyFinger@gmx.net
-- ICQ : 145873101
-- HomePage: http://mitglied.lycos.de/dirtyfinger01/
-- (Yes, i know i still suck as Web Designer)
--=====================================
-- This script automatically bans pm-spammers and mainchat-spammers.
--
-- This does not protect from spam, but at least the spammer can't come back (at least not with the same ip)
-- For the script to work you might have to change the PtokaX flood-protection values (chat limit in the 'Rules and bots' section)
-- The script bans by default after 20 pms are being sent within 10 seconds.
-- But if the hub disconnects BEFORE the script triggers, no banning is possible and the spammer can come back.
-- So choose some quite generous settings, e.g. the first line of the above spam contains about 400 characters.
-- For the script to trigger you have to allow the users to send 8000 characters per second so the script can trigger.
--
-- Don't worry, real flooders send much much more so you'll be fine.
--
-- Version Changes :
-- 1.2 : bans mainchat flooder too. I didn't implement it in previous versions because i thought ptokax dealt with it.
-- 1.1 : removed the mainchat flooding of ban notifications
-- 1.0 : first version

sBotName = "{AntiFlood}"

PMCount = {}
MainCount = {}
MaxPM = 20 -- more than 20 pms within 10 seconds cause a ban
MaxMain = 20 -- more than 20 mainchat msgs within 10 seconds cause a ban
timeslice = 10*1000 -- 10 seconds


function Main()
frmHub:RegBot(sBotName)
SendToAll(sBotName.." "..date(" launched at %B %d %Y %X "))
SetTimer(timeslice)
StartTimer()

end

--// This function is fired when a new data arrives
function DataArrival(curUser, sData)
if strfind(sData,"$To:") then
if PMCount[curUser.sIP] ~= nil then
PMCount[curUser.sIP] = PMCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])
if PMCount[curUser.sIP] > MaxPM then
FloodDetected (curUser, sData)
PMCount[curUser.sIP] = -100
end
else
PMCount[curUser.sIP] = 1
end
elseif strfind(sData,curUser.sName,1,plain) == 2 then
if MainCount[curUser.sIP] ~= nil then
MainCount[curUser.sIP] = MainCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])
if MainCount[curUser.sIP] > MaxMain then
FloodDetected (curUser, sData)
MainCount[curUser.sIP] = -100
end
else
MainCount[curUser.sIP] = 1
end
end

end

function OnTimer()
--for k,v in PMCount do
-- SendToAll("---------",k.."\t"..v)
--end
PMCount = {}
MainCount = {}
end

function FloodDetected (curUser,sData)
local message = " -= Spam Warning =-"
local name,ip = curUser.sName,curUser.sIP
SendToAll ("# "..sBotName.."-Alert #--> "..name .. " has been banned for spamming.")
message = message .."\r\n\t\t"
.. "Violation detected by: " .. name .."\r\n\t\t"
.. "IP: " .. ip .. "\t\r\n\t\t"
.. "Last packet : \t" .. sData

SendPmToOps (sBotName,message)
curUser:Ban()
curUser:Disconnect()
end

bastya_elvtars

This functionality is in PtokaX, no additional script is necessary.
Everything could have been anything else and it would have just as much meaning.

Creative

Hello, i am using  PtokaX DC Hub 0.3.5.2.
I disabled everything in Options, but still users get disconnected if they paste big messages in PM.
Is there any bug in  PtokaX DC Hub 0.3.5.2???

Thor

Check the Deflood tab, instead of the Options tab ;) By the way, I think there were a problem with the private-message length limitation, which has been fixed in the newest version, so use that.

Creative

ohh sorry, it was Deflood tab only in which i had disabled all the options.....
Ya, i'll try using the new version... The new version is Ptokax0.3.6.0.7z right??

Thor

Yes, that's it. I suggest you to not to disable all deflood settings, rather than set it up correctly - try while it will work well.

SMF spam blocked by CleanTalk