----------------------------------------
-----------------------------------------
--// Simple Nick Checker, by: NightLitch
--// Request by: [G-T-E]Gate?
--// Small fix
--// Got help form Plop for strfind.
--// Rewrote it from UserConnected to DataArrival
--// Bug fixed so not Nick234 or 535Nick432 can slip through
-----------------------------------------
-----------------------------------------
function DataArrival(sUser, sData)
if strsub(sData, 1, 13) == "$ValidateNick" then
local s,e,Nick = strfind(sData, "k (.*)%|$")
if Nick then
local s,e,num1,tag1,num2,tag2,num3 = strfind(Nick, "^(%d*)(%p*%P*%p*)(%d*)(%D*)(%d*)")
if tag1~="" and tag2=="" then
s,e,num1,tag1,num2 = strfind(Nick, "^(%d*)(%D*)(%d*)")
end
if num1~="" or num2~="" or num3~="" then
sUser:SendData("It is not allowed to have numbers in your nick...")
sUser:Disconnect()
end
end
end
end
-----------------------------------------
-----------------------------------------
Enjoy / NL
NIGHTLITCH Ur A WIZARD !!
Ur final Result is JUST AMAZING !!!
A toast to u my friend is worth loads Thanks from G8 (http://www.hiderbooks.com/HB_-johnwalker.JPG)
Iam sure that loads of our members at Lua will enjoy this script u made for me... Tks again ...
----------------------------------------
-----------------------------------------
--// Simple Nick Checker, by: NightLitch
--// Request by: [G-T-E]Gate?
--// Small fix
--// Got help form Plop for strfind.
--// Rewrote it from UserConnected to DataArrival
--// Bug fixed so not Nick234 or 535Nick432 can slip through
-----------------------------------------
-----------------------------------------
function DataArrival(sUser, sData)
if strsub(sData, 1, 13) == "$ValidateNick" then
local s,e,Nick = strfind(sData, "k (.*)%|$")
if Nick then
local s,e,num1,tag1,num2,tag2,num3 = strfind(Nick, "^(%d*)(%p*%P*%p*)(%d*)(%D*)(%d*)")
if tag1~="" and tag2=="" then
s,e,num1,tag1,num2 = strfind(Nick, "^(%d*)(%D*)(%d*)")
end
if num1~="" or num2~="" or num3~="" then
sUser:SendData("It is not allowed to have numbers in your nick...")
sUser:Disconnect()
end
end
end
end
-----------------------------------------
-----------------------------------------
QuoteOriginally posted by NightLitch
----------------------------------------
-----------------------------------------
--// Simple Nick Checker, by: NightLitch
--// Request by: [G-T-E]Gate?
--// Small fix
--// Got help form Plop for strfind.
--// Rewrote it from UserConnected to DataArrival
--// Bug fixed so not Nick234 or 535Nick432 can slip through
-----------------------------------------
-----------------------------------------
function DataArrival(sUser, sData)
if strsub(sData, 1, 13) == "$ValidateNick" then
local s,e,Nick = strfind(sData, "k (.*)%|$")
if Nick then
local s,e,num1,tag1,num2,tag2,num3 = strfind(Nick, "^(%d*)(%p*%P*%p*)(%d*)(%D*)(%d*)")
if tag1~="" and tag2=="" then
s,e,num1,tag1,num2 = strfind(Nick, "^(%d*)(%D*)(%d*)")
end
if num1~="" or num2~="" or num3~="" then
sUser:SendData("It is not allowed to have numbers in your nick...")
sUser:Disconnect()
end
end
end
end
-----------------------------------------
-----------------------------------------
Enjoy / NL
u should also add filter setting for []nick
as utb and some others sometimes use [420]Nick
I already check it pH?tt? and they get in as well
G8
QuoteOriginally posted by [G-T-E]Gate?
NIGHTLITCH Ur A WIZARD !!
Ur final Result is JUST AMAZING !!!
A toast to u my friend is worth loads Thanks from G8 (http://www.hiderbooks.com/HB_-johnwalker.JPG)
Iam sure that loads of our members at Lua will enjoy this script u made for me... Tks again ...
Am just doing my job ;-P hehe
poff / NL
QuoteOriginally posted by (uk-kingdom)pH?tt?
u should also add filter setting for []nick
as utb and some others sometimes use [420]Nick
Check it real good Phatty m8 the you see it is a ok code... ;-D
cheers / NL
NL
I wanna thank u once again, I never had such a CLEAN Users List before and I mean Really Clean !!!!!!!!!!!
Thanks M8
Regards and Happy Summer
G8
A new request
NightLitch
Emperor
Its still concerning Nick Checker,
Can u adjust the scipt so that it does not check the profiles Master, Operator,Vip, Reg, Moderator and Netfounder
That would be the Gr8
G8
Gonna see what I can do when I get the time...
Cheers / NL
ok NL looking forward to another testrun
G8 ;)
New one out:
----------------------------------------
-----------------------------------------
--// Simple Nick Checker, by: NightLitch
--// Request by: [G-T-E]Gate?
--// Small fix
--// Got help form Plop for strfind.
--// Rewrote it from UserConnected to DataArrival
--// Bug fixed so not Nick234 or 535Nick432 can slip through
--// Added ProfileChecking
--// Registered UsersName is Case Sensitive...
-----------------------------------------
-----------------------------------------
--// Level Check ( Just fix it so your Profiles.dat is right for this table... )
ProfileCheck = {
[-1] = 1, -- User
[3] = 2, -- Reg
[2] = 3, -- Vip
[1] = 4, -- Operator
[0] = 5, --Master
}
--// User over This level is not Checked...
CheckLevel = 3
-----------------------------------------
-----------------------------------------
RegT = {}
RegF = "../RegisteredUsers.dat"
function Main()
LoadRegistredFile()
end
function DataArrival(sUser, sData)
if strsub(sData, 1, 13) == "$ValidateNick" then
local s,e,Nick = strfind(sData, "k (.*)%|$")
if Nick then
if tonumber(ProfileCheck[LevelCheck(Nick)]) <= tonumber(CheckLevel) then
local s,e,num1,tag1,num2,tag2,num3 = strfind(Nick, "^(%d*)(%p*%P*%p*)(%d*)(%D*)(%d*)")
if tag1~="" and tag2=="" then
s,e,num1,tag1,num2 = strfind(Nick, "^(%d*)(%D*)(%d*)")
end
if num1~="" or num2~="" or num3~="" then
sUser:SendData("It is not allowed to have numbers in your nick...")
sUser:Disconnect()
end
end
end
end
end
function LevelCheck(nick)
if RegT[nick] then
return RegT[nick][2]
else
return -1
end
end
function LoadRegistredFile()
local handle = openfile(RegF, "r")
if (handle) then
local line = read(handle)
while line do
s,e,nick,password,status = strfind(line, "(.+)|(.+)|(%d+)")
RegT[strlower(nick)] = {password, status}
line = read(handle)
end
closefile(handle)
end
end
-----------------------------------------
-----------------------------------------
Hope it works as it should / NL
will testrun i a bit , so many new users that need assistance .
Thanks M8
G8
All ready notice a bug that I will fix...
Updated:
----------------------------------------
-----------------------------------------
--// Simple Nick Checker, by: NightLitch
--// Request by: [G-T-E]Gate?
--// Small fix
--// Got help form Plop for strfind.
--// Rewrote it from UserConnected to DataArrival
--// Bug fixed so not Nick234 or 535Nick432 can slip through
--// Added ProfileChecking
--// Registered UsersName is Case Sensitive...
-----------------------------------------
-----------------------------------------
--// Level Check ( Just fix it so your Profiles.dat is right for this table... )
ProfileCheck = {
[-1] = 1, -- User
[3] = 2, -- Reg
[2] = 3, -- Vip
[1] = 4, -- Operator
[0] = 5, --Master
}
--// User over This level is not Checked...
CheckLevel = 3
-----------------------------------------
-----------------------------------------
RegT = {}
RegF = "../RegisteredUsers.dat"
function Main()
LoadRegistredFile()
end
function DataArrival(sUser, sData)
if strsub(sData, 1, 13) == "$ValidateNick" then
local s,e,Nick = strfind(sData, "k (.*)%|$")
if Nick then
Profile = LevelCheck(Nick)
if ProfileCheck[tonumber(Profile)] <= tonumber(CheckLevel) then
local s,e,num1,tag1,num2,tag2,num3 = strfind(Nick, "^(%d*)(%p*%P*%p*)(%d*)(%D*)(%d*)")
if tag1~="" and tag2=="" then
s,e,num1,tag1,num2 = strfind(Nick, "^(%d*)(%D*)(%d*)")
end
if num1~="" or num2~="" or num3~="" then
sUser:SendData("It is not allowed to have numbers in your nick...")
sUser:Disconnect()
end
end
end
end
end
function LevelCheck(nick)
if RegT[nick] then
return RegT[nick][2]
else
return -1
end
end
function LoadRegistredFile()
local handle = openfile(RegF, "r")
if (handle) then
local line = read(handle)
while line do
s,e,nick,password,status = strfind(line, "(.+)|(.+)|(%d+)")
RegT[nick] = {password, status}
line = read(handle)
end
closefile(handle)
end
end
-----------------------------------------
-----------------------------------------
Enjoy / NL
After running it for a few days the Response was PERFECT !!!
Tks again
G8
"Its grand with summer house cleaning"
QuoteOriginally posted by [G-T-E]Gate?
After running it for a few days the Response was PERFECT !!!
Tks again
G8
"Its grand with summer house cleaning"
yw / NL =)
Oppps!!!
[0,5Mbit]Nick , [0.5Mbit]Nick , [1.5Mbit]Nick and [1,5Mbit]Nick is disconnected >>not good :(
But whole numericals [10Mbit]Nick gets in.
What ya think NL ???
G8
gonna see what I can do / NL
here is the strfind for it.
i leave it 2 nightlitch 2 stuff it into the script.
tTable = {
["[0,5Mbit]Nick"]=1,
["[0.5Mbit]Nick"]=1 ,
["[1.5Mbit]Nick"]=1 ,
["[1,5Mbit]Nick"]=1,
["[10Mbit]Nick"]=1
}
print("")
function checkprefix(Nick)
local s,e,num1,tag1,num2,tag2,num3 = strfind(Nick, "^(%d*)(%p*[%.%,%P]*%p*)(%d*)(%D*)(%d*)")
print(Nick)
print(tag1)
print("")
end
for a,b in tTable do
checkprefix(a)
end
the result=[1.5Mbit]Nick
[1.5Mbit]
[0,5Mbit]Nick
[0,5Mbit]
[10Mbit]Nick
[10Mbit]
[1,5Mbit]Nick
[1,5Mbit]
[0.5Mbit]Nick
[0.5Mbit]
plop
Updated:
----------------------------------------
-----------------------------------------
--// Simple Nick Checker, by: NightLitch
--// Request by: [G-T-E]Gate?
--// Small fix
--// Got help form Plop for strfind.
--// Rewrote it from UserConnected to DataArrival
--// Bug fixed so not Nick234 or 535Nick432 can slip through
--// Added ProfileChecking
--// Registered UsersName is Case Sensitive...
--// Updated strfind, thx 2 Plop
-----------------------------------------
-----------------------------------------
--// Level Check ( Just fix it so your Profiles.dat is right for this table... )
ProfileCheck = {
[-1] = 1, -- User
[3] = 2, -- Reg
[2] = 3, -- Vip
[1] = 4, -- Operator
[0] = 5, --Master
}
--// User over This level is not Checked...
CheckLevel = 3
-----------------------------------------
-----------------------------------------
RegT = {}
RegF = "../RegisteredUsers.dat"
function Main()
LoadRegistredFile()
end
function DataArrival(sUser, sData)
if strsub(sData, 1, 13) == "$ValidateNick" then
local s,e,Nick = strfind(sData, "k (.*)%|$")
if Nick then
Profile = LevelCheck(Nick)
if ProfileCheck[tonumber(Profile)] <= tonumber(CheckLevel) then
local s,e,num1,tag1,num2,tag2,num3 = strfind(Nick, "^(%d*)(%p*[%.%,%P]*%p*)(%d*)(%D*)(%d*)")
if tag1~="" and tag2=="" then
s,e,num1,tag1,num2 = strfind(Nick, "^(%d*)(%D*)(%d*)")
end
if num1~="" or num2~="" or num3~="" then
sUser:SendData("It is not allowed to have numbers in your nick...")
sUser:Disconnect()
end
end
end
end
end
function LevelCheck(nick)
if RegT[nick] then
return RegT[nick][2]
else
return -1
end
end
function LoadRegistredFile()
local handle = openfile(RegF, "r")
if (handle) then
local line = read(handle)
while line do
s,e,nick,password,status = strfind(line, "(.+)|(.+)|(%d+)")
RegT[nick] = {password, status}
line = read(handle)
end
closefile(handle)
end
end
-----------------------------------------
-----------------------------------------
Enjoy / NL
On to testing ..................
Thanks NL & Plop
Gate
Hi there,
Can someone modify that script to let only the ppl with nomebrs in the last part of the nickname.. and ppl that have nombers at the begining of the nickname to be kicked ?
like: '1980Nick' to be out and 'Nick1980' to be let alone ?
Thx