anti-[OP]
 

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

anti-[OP]

Started by plop, 28 February, 2005, 17:39:52

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

plop

function NewUserConnected(curUser)
	if string.sub(curUser.sName, 1, 4) == "[0P]" then
		curUser:Disconnect()
		return 1
	end
end

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

blackwings

plop, how about this =
--Requested by blackwings 
--Made by nErBoS
--converted to LUA 5 by blackwings
sBot = "Hub-Security"

arrBadNick = {
	"[OP]","(op)","[operator]","(operator)","[admin]","(admin)","[su]","(su)","[master]",
	"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
	"[fc]","(fc)","%","$","^","*"
	
}	-- Put on this table all the prefix and nick you want to block

function MyINFOArrival(user)
	for i=1, table.getn(arrBadNick) do
		if (string.len(user.sName) >= string.len(arrBadNick[i])) then
			if (string.sub(string.lower(user.sName),1,string.len(arrBadNick[i])) == string.lower(arrBadNick[i])) then
				user:Disconnect()
			end
		end
	end
end


plop

this is a bit faster and efficient.
--Requested by blackwings 
--Made by nErBoS
--converted to LUA 5 by blackwings
--optimized a bit by plop

sBot = "Hub-Security"

arrBadNick = {
	"[OP]","(op)","[operator]","(operator)","[admin]","(admin)","[su]","(su)","[master]",
	"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
	"[fc]","(fc)","%","$","^","*"
	
}	-- Put on this table all the prefix and nick you want to block

function MyINFOArrival(user)
   local sUser = string.lower(user.sName)
   if not user.bRegistered then
	for i=1, table.getn(arrBadNick) do
	   if (string.find(sUser, arrBadNick[i])) then
	      user:Disconnect()
		break
	   end
	end
   end
end

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

bastya_elvtars

Why not detect using $ValidateNick?
Everything could have been anything else and it would have just as much meaning.

PPK

QuoteOriginally posted by bastya_elvtars
Why not detect using $ValidateNick?
QuickList  not use $ValidateNick command  ;)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

bastya_elvtars

baaaaaaaaa half-sleeping better stop forum browsing.
Everything could have been anything else and it would have just as much meaning.

blacksun

hi, could someone optimise the small script that plop posted so that it only checks normal users (not regs,vips,ops etc etc).

if there's such a script, give me a hint/link .

with respect,
F.C.

Markitos

#7
QuoteOriginally posted by blacksun
hi, could someone optimise the small script that plop posted so that it only checks normal users (not regs,vips,ops etc etc).

if there's such a script, give me a hint/link .

with respect,
F.C.
Dnt know is this is correct
function NewUserConnected(curUser)

	if string.sub(curUser.sName, 1, 4) == "[0P]" and not curUser.bRegistered then

		curUser:Disconnect()

		return 1

	end

end

It's wrong isnt it  ?(

---/Edit/--
Now it works!
[10:07] *** A ligar a localhost...
[10:07] *** Ligado
[10:07]  This hub is running PtokaX DC Hub 0.3.3.21 [debug] (UpTime: 0 days, 0 hours, 0 minutes)
[10:07] *** Desligado

SMF spam blocked by CleanTalk