All I need is a simple script that forces users to have a decent nickaname. The script should 2 things :)
1. the first char of a user's nickname must always be a letter (lowercare or uppercase it doesn't matter)
2. The only exception to the above rule is this char "["
I really need this script because lots of users enter my hub with nicknames like "..John" or "!#Marie" only to see themself at the top of the userlist.. it's really frustrating :)
I hope you guys understood my request.. if not, feel free to ask me any questions u like ;)
why u dont put these symbols in bad nicknames list?
-- Bad 1st Letter
-- Made by Madman
-- Request by Ubikk
function NewUserConnected(curUser)
Passed = 0 -- Passed is 0
local FirstLetter = string.sub(curUser.sName,1,1) -- Get first letter
for I=1, table.getn(Good) do -- Read the table
if string.lower(FirstLetter) == string.lower(Good[I]) then -- Try 2 find user's first letter in table
Passed = 1 -- We did
break -- Stop read table
end
end
-- We didnt find first letter in table, so Passed is still 0
if Passed == 0 then
curUser:SendData(frmHub:GetHubBotName(), "Your nick start with an invaild char, please only use a-z as first letter")
curUser:Disconnect() -- Disconnect
end
end
Good = { "[", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", }
This should work...
The script works excellent ! :D
Thank you so much :rolleyes: