function NewUserConnected(curUser)
if string.sub(curUser.sName, 1, 4) == "[0P]" then
curUser:Disconnect()
return 1
end
end
plop
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
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
Why not detect using $ValidateNick?
QuoteOriginally posted by bastya_elvtars
Why not detect using $ValidateNick?
QuickList (http://dcplusplus.sourceforge.net/wiki/index.php/QuickList) not use $ValidateNick command ;)
baaaaaaaaa half-sleeping better stop forum browsing.
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.
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