BlockBot
 

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

BlockBot

Started by (!(Tys?kan)=), 09 May, 2004, 22:03:48

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

(!(Tys?kan)=)

Hi, who can modify this script:
cmd1 = "!b"

BlockedNicks = {}

function Main()
frmHub:EnableFullData(1)
end

BlockTriggs = {
	["$Rev"] = 1,
	["$Con"] = 2,
}


function DataArrival(curUser,data)
	if strsub(data,1,1) == "$" then
		local str1 = strsub(data,1,4)
		if BlockTriggs[str1] then
			if BlockedNicks[strlower(curUser.sName)] then
				curUser:SendData("*** Files blocked")
				return 0
			elseif BlockTriggs[str1] == 1 then
				local _,_,conNick = strfind(data,"(%S+)|$")
				if BlockedNicks[strlower(conNick)] then
					curUser:SendData("*** The user are infected.")
					return 1
				end
			elseif BlockTriggs[str1] == 2 then
				local _,_,conNick = strfind(strsub(data,14,strlen(data)),"^(%S+)")
				if BlockedNicks[strlower(conNick)] then
					curUser:SendData("*** The user infected.")
					return 1
				end
			end
		end
	elseif strsub(data,1,1) == "<" and curUser.bOperator then
		local _,_,cmd,nick = strfind(data,"^%b<>%s+(%S+)%s+(%S+)|$")
		if cmd and cmd == cmd1 then
			if BlockedNicks[strlower(nick)] then
				BlockedNicks[strlower(nick)] = nil
				curUser:SendData("*** "..nick.." blocked.")
			else
				BlockedNicks[strlower(nick)] = 1
				curUser:SendData("*** "..nick.." blocked.")
			end
			return 1
		end
	end
end

The script must writing user's who's blocked to file, and the script must blocking some file such exe,tmp and other...
Thanks!
--Ty--

dvxjunkie

-- try this should work

badnicks = {
["badnick"] = 1,
["another badnick"] = 1,
["another badnick"] = 1 -- note no comma after last nick in list
}
function Main()
frmHub:EnableFullData(1)
end
function DataArrival(curUser, data)
if (strsub(data, 1, 1) == "$" and strfind(data, "ConnectToMe") and  badnicks[curUser.sName]) then
return 1
end
end

SMF spam blocked by CleanTalk