PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: Northwind on 07 May, 2006, 15:48:53

Title: Block users who use onlynumbers in name
Post by: Northwind on 07 May, 2006, 15:48:53
Hello, i have seen that a lot of flooders uses only number nicks like

<865472987437543> THIS HUB SUCKS!!!!
<842354298645423> 7h15 hu8 15 p\/\/n3d 8y \/\/1nD0\/\/z team
<865423543412534> FUCK YOU ALL !!!

so i want to have script what block users with number names.
Title: Re: Block users who use onlynumbers in name
Post by: Thor on 07 May, 2006, 16:22:10
function ChatArrival(curUser,data)
if string.find(curUser.sName,"%d+") and not string.find(curUser.sName,"%a") then
local botname = frmHub:GetHubBotName()
curUser:SendData(botname,"You are not authorized to chat")
return 1
end
end
Title: Re: Block users who use onlynumbers in name
Post by: Northwind on 07 May, 2006, 16:23:32
thank you have to test it :)
Title: Re: Block users who use onlynumbers in name
Post by: bastya_elvtars on 08 May, 2006, 00:48:14
How about this: if not string.find(user.sName,"%D+")
Title: Re: Block users who use onlynumbers in name
Post by: bastya_elvtars on 08 May, 2006, 20:10:02
Quote from: Mutor on 08 May, 2006, 00:55:55
Quote from: bastya_elvtars on 08 May, 2006, 00:48:14
How about this: if not string.find(user.sName,"%D+")

That would match [one or more] non-digit(s) anywhere in nick, the request was to block a nick comprised of all digits.

Yes, that line means: 'if we cannot find non-digits, then...'  :)