Nick check (against leecheers??)
 

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

Nick check (against leecheers??)

Started by Shurlock, 14 January, 2005, 01:52:33

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shurlock

Hi all,

I would like to eliminate the possibility for people to enter the hub with nicknames that contain characters that are repeated MORE than twice within their nick.

They tend to 'change' 3 to 4 characters, 4 to 5, etc. etc.
Sample: nickname__  will be changed into nickname____ (One more underscore!)
Or... nicccknamme  will be changed into niccknammme

Above that, I would like to filter the name to pure ASCII characters ONLY! No ?  or ?  or other non-alpha/numeric characters, except for '-' and underscores.

I realize this will probably slow down the hub, but.... changing nick will eliminate the downloads of other HONEST users.

I hope someone comes up with a bright idea to check this without causing too much 'lag' on the hub as the  HONEST users (and I !!!) experience this as very annoying!

Thanks in advance!

((Should PtoKax have this option built in, please explain to me. Thanks!))  
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

??????Hawk??????

hi m8  

by  blocking  ascii   youll  find  you'll block  half of the dc users...

like  me  for instance   lol

i never did like that option on that ...   Ehem..... Other y-Hub soft


Most ppl have the  ' auto find alternative download locations  '  enabled in their clients anyway.
so there downloads will continue.




??????Hawk??????    <---- dont KILL the ascii... :P  :P

Shurlock

Thanks for the warning Hawk, but....
I would prefer securing the hub against fakers.

Thing is, that these 'non-ASCII' characters are not checked by DOS-oriented programs that do very good jobs.

I'd rather have users in my hub that are serious, than users that have 'imagination'. (Sorry, nothing peronal!!)

So, if anyone can help me out on this subject,, I would be very happy!

Thanks.
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

imby

#3
Yeah, I agree, I dislike ASCII. Any way to block non-alphanumeric characters in PtokaX? Keeping [{()}]_- of course, possibly @ to.

??????Hawk??????

#4
heya peeps  ..

its  not  perfect  but seems to  do the job..

--// Hawk Blocker By ....
--//  ??????Hawk??????   <---- well if your gonna block me  ill get my ascii in here  :p
--//  15/01/2005


bot = "Hawk-Blocker"  -- Bots name 

function Main() 
OKchars ="aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ1234567890-_(){}[]@"
end 



function NewUserConnected(curUser) 
local CharsLeft = curUser.sName
local CharToCheck = "a"
	while CharToCheck do
		_,_,CharToCheck,CharsLeft = strfind(CharsLeft,"(%S)(.*)")
			if  CharsLeft == nil then break
			else
				if not strfind(OKchars,CharToCheck) then
					curUser:SendData(bot,"\r\n\r\nYou have Illegal Chars in your nick Please Use Standard Charicters:-\r\n\r\nok Chars are:-\r\n\r\n"..OKchars.."\r\n\r\n") 
					curUser:Disconnect()
				end
			end
	end
end 


function OpConnected(curUser) 
NewUserConnected(curUser)
end

Change it,, edit it  and make it work for  you  :-)

Have fun peeps  and dont ask me in ur hubs  lololol

??????Hawk??????

BoJlk

Isn't there a build in option in PX?



i'm just asking because i have the same problem with nicknames

imby

QuoteOriginally posted by ??????Hawk??????
heya peeps  ..

its  not  perfect  but seems to  do the job..

--// Hawk Blocker By ....
--//  ??????Hawk??????   <---- well if your gonna block me  ill get my ascii in here  :p
--//  15/01/2005


bot = "Hawk-Blocker"  -- Bots name 

function Main() 
OKchars ="aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ1234567890-_(){}[]@"
end 



function NewUserConnected(curUser) 
local CharsLeft = curUser.sName
local CharToCheck = "a"
	while CharToCheck do
		_,_,CharToCheck,CharsLeft = strfind(CharsLeft,"(%S)(.*)")
			if  CharsLeft == nil then break
			else
				if not strfind(OKchars,CharToCheck) then
					curUser:SendData(bot,"\r\n\r\nYou have Illegal Chars in your nick Please Use Standard Charicters:-\r\n\r\nok Chars are:-\r\n\r\n"..OKchars.."\r\n\r\n") 
					curUser:Disconnect()
				end
			end
	end
end 


function OpConnected(curUser) 
NewUserConnected(curUser)
end

Change it,, edit it  and make it work for  you  :-)

Have fun peeps  and dont ask me in ur hubs  lololol

??????Hawk??????

Great, thanks very much, two things:

can someone convert this to LUA5?

and is this fast? Wont take any considerable bandwidth/resources?

Markitos

#7
Here u go:
--// Hawk Blocker By ....

--//  ??????Hawk??????   <---- well if your gonna block me  ill get my ascii in here  :p

--//  15/01/2005

--// Lua 5 version by Markitos


bot = "Hawk-Blocker"  -- Bots name 

function Main() 

OKchars ="aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ1234567890-_(){}[]@"

end 


function NewUserConnected(curUser) 

local CharsLeft = curUser.sName

local CharToCheck = "a"

	while CharToCheck do

		_,_,CharToCheck,CharsLeft = string.find(CharsLeft,"(%S)(.*)")

			if  CharsLeft == nil then break

			else

				if not string.find(OKchars,CharToCheck) then

					curUser:SendData(bot,"\r\n\r\nYou have Illegal Chars in your nick Please Use Standard Charicters:-\r\n\r\nok Chars are:-\r\n\r\n"..OKchars.."\r\n\r\n") 

					curUser:Disconnect()

				end

			end

	end

end 


function OpConnected(curUser) 

NewUserConnected(curUser)

end

About bandwith nd resources no worry...Ive tested the script nd its really fast and efficient

Cheers...

[18:33]  

You have Illegal Chars in your nick Please Use Standard Charicters:-

ok Chars are:-

aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ1234567890-_(){}[]@

imby

No syntax errors in script file nickcheck.lua
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:83: unfinished capture
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:83: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:83: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:83: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:83: malformed pattern (missing `]')

??????Hawk??????

#9
QuoteSyntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:83: unfinished capture


Hmmmm  there is no line 83  

even with Markitos double line spaced  there is only 64 lines ...  

i think you maby  copied and pasted a little too much from his post  ..  

try again m8

imby

QuoteOriginally posted by ??????Hawk??????
QuoteSyntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:83: unfinished capture


Hmmmm  there is no line 83  

even with Markitos double line spaced  there is only 64 lines ...  

i think you maby  copied and pasted a little too much from his post  ..  

try again m8

Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')


Hi, this is the third time i've tryed and got errors... I may not be the greatest at scripting ever, but I think I have the capacity to copy and paste correctly! Seriously you guys should try it, if there's nothing wrong with the code, then there's something wrong with the formatting that makes it impossible to copy and paste.

Madman

You should copy from
--// Hawk Blocker By ....
to
NewUserConnected(curUser)

end

but dont copy the
----------------------------------
line...
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

jiten

QuoteOriginally posted by imby
Seriously you guys should try it, if there's nothing wrong with the code, then there's something wrong with the formatting that makes it impossible to copy and paste.
Tested it here and it's working fine.

Cheers

imby

QuoteOriginally posted by madman
You should copy from
--// Hawk Blocker By ....
to
NewUserConnected(curUser)

end

but dont copy the
----------------------------------
line...

Exactly what I did X(

imby

QuoteOriginally posted by jiten
QuoteOriginally posted by imby
Seriously you guys should try it, if there's nothing wrong with the code, then there's something wrong with the formatting that makes it impossible to copy and paste.
Tested it here and it's working fine.

Cheers

Leave it loaded for an hour or so/try testing by signing in with an invalid character. Mine doesn't generate errors as soon as I load it, it generates them when it's been left in for a while.

imby

Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: unfinished capture
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: unfinished capture
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: unfinished capture
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: unfinished capture
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: unfinished capture
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: unfinished capture
Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:65: malformed pattern (missing `]')

=/

Dessamator

hmm, nasty bug , but well, u need to show us line 65 of ur script, we cant help until u do so !
Ignorance is Bliss.

imby

Right, I've reformatted it into an uber condensed version:

bot = "Hawk-Blocker"  -- Bots name 
function Main()
OKchars ="aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ1234567890-_(){}[]@"
end
function NewUserConnected(curUser)
local CharsLeft = curUser.sName
local CharToCheck = "a"
while CharToCheck do
_,_,CharToCheck,CharsLeft = string.find(CharsLeft,"(%S)(.*)")
if  CharsLeft == nil then break
else
if not string.find(OKchars,CharToCheck) then
curUser:SendData(bot,"\r\n\r\nYou have Illegal Chars in your nick Please Use Standard Charicters:-\r\n\r\nok Chars are:-\r\n\r\n"..OKchars.."\r\n\r\n")
curUser:Disconnect()
end
end
end
end
function OpConnected(curUser)
NewUserConnected(curUser)
end

Which gives the error:

Syntax ... - Games\0.3.3.0.b17.03.nt.rls\scripts\nickcheck.lua:12: malformed pattern (missing `]')

NotRabidWombat

You're using magic characters in the search pattern.

malformed pattern (missing `]') - exactly what it says
unfinished capture - missing a ')'

You must either escape all the magic chars with a function like:
function util.escapeMagicChars( sString )
	local sRet = string.gsub(sString, "([%^%$%(%)%%%.%[%]%*%+%-%?])", "%%%1");
	return sRet;
end
or set plain in string.find to true:
bot = "Lame-Blocker"  -- Bots name 

validChars ="aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ1234567890-_(){}[]@";

function NewUserConnected(curUser)
	local pos = string.find(curUser.sName,validChars,1,true);
	if( pos ) then
		local msg = string.format("Illegal character '%s' in nick. Valid characters are:\r\n%s",
			string.sub(curUser.sName, pos, 1),
			validChars);
		curUser:SendData(bot,msg);
		curUser:Disconnect();
	end
end

OpConnected = NewUserConnected;

You guys have used lua before, right? ;-)

-NotRabidWombat


I like childish behavior. Maybe this post will be deleted next.

imby

#19
Well I thought it was blatantly obvious that the reason this error was not found was because it pointed to a line that did not exist.

Least these guys post without mocking other people's abilities and choice of scripts...

Further, some people don't like 'kewl', trendy looking characters, your opinion on this matter is not above all others, you arrogant swine.

Anyway thankyou for your help.  :P

NotRabidWombat

#20
Well I thought it was blatantly obvious that the reason this error was not found was because it pointed to a line that did not exist.
I thought it was blatantly obvious that copying text from a post here results in doubled new lines.
Line 65 of Markitos' post (with the double new lines) is:
if not string.find(OKchars,CharToCheck) then
The same as line 12 of your "uber condensed" version ;-)

Besides, you can still infer the problem from the debug message.

Least these guys post without mocking other people's abilities and choice of scripts...
Kindly spoken misinformation is supposed to be better than blunt correctness?

Further, some people don't like 'kewl', trendy looking characters, your opinion on this matter is not above all others, you arrogant swine.
I wasn't aware I made a comment on 'kewl' ASCII. However, the script is lame that it will not do what the original author requested; block fakers.

Anyway thankyou for your help.
You are welcome.

Edit: s/white space/new lines/g

-NotRabidWombat


I like childish behavior. Maybe this post will be deleted next.

imby

1. Indeed, but I gather those who offered help at that particular stage only took a quick glance at the problem. One cannot expect anything more as obviously you can't expect people to give you hours of their personal time.

2. Good question actually, you might be right.

3. Okay, my apologies for making assumptions on what you were actually implying.

SMF spam blocked by CleanTalk