Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   Name Ristrict (https://postpacific.loc-online.com/showthread.php?t=3640)

xjazz 13.03.2006 17:25

Name Ristrict
 
If it possible to make a name ristrict (so player cant create chars with an _ )
or nummbers in there names ??

drzoom 13.03.2006 17:27

Look at stored procedures.

Shawnmb 13.03.2006 18:14

It's a table in Lin2World actually.

Sire 14.03.2006 01:39

Well, there is a table that puts restricted names, but you can modify the stored procedure yourself to add your own validation checks. I have done this to block people from prefixing their name with Gm or Dev.

Just modify the lin_CreateChar stored procedure in the lin2world database. Add your checks before the insert character statements, and then use RAISEERROR to push an error message to L2Server, and RETURN -1 to stop the stored procedure from continuing.

IF @char_name LIKE N'_'
BEGIN
RAISERROR ('Character name has _ : name = [%s]', 16, 1, @char_name)
RETURN -1
END

This should do what you need.

GMan 14.03.2006 08:07

I thought l2server already blooked _ unless my server build has something in there already to block

xjazz 14.03.2006 09:45

Sire thx man i tryed and it work :)

Sire 15.03.2006 02:21

Glad I could finally help someone :D


All times are GMT. The time now is 15:27.