Raised This Month: $51 Target: $400
 12% 

Restrict Names 1.2a


Post New Thread Reply   
 
Thread Tools Display Modes
RatreX
Junior Member
Join Date: Apr 2009
Old 04-08-2009 , 20:04   Re: Restrict Names 1.2a
Reply With Quote #271

thanks
and 1 more question:

how can I kick all players with word billy in their names
but exclude player with name Dry.a | billy

P.S.
Dry.a | billy
is for example

sorry for my bad ENG

Last edited by RatreX; 04-08-2009 at 20:07.
RatreX is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-08-2009 , 22:45   Re: Restrict Names 1.2a
Reply With Quote #272

Quote:
Originally Posted by RatreX View Post
how can I kick all players with word billy in their names
but exclude player with name Dry.a | billy
Code:
"(?<!dry\.a \| )billy"
__________________
Brad is offline
bedna12
BANNED
Join Date: Mar 2009
Old 04-12-2009 , 03:49   Re: Restrict Names 1.2a
Reply With Quote #273

nice. if u restrick AKT name it would ban/kick everyone who has it? lets say ATKabc-clan member
ATKdef-not a member
so is it goin to ban /kick the one whos not member ? and wont do anythink to mamber?
bedna12 is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-12-2009 , 11:04   Re: Restrict Names 1.2a
Reply With Quote #274

Quote:
Originally Posted by bedna12 View Post
nice. if u restrick AKT name it would ban/kick everyone who has it? lets say ATKabc-clan member
ATKdef-not a member
so is it goin to ban /kick the one whos not member ? and wont do anythink to mamber?
You could set it up to do that.
__________________
Brad is offline
Lateseptember
New Member
Join Date: Apr 2009
Location: Romania
Old 04-28-2009 , 06:29   Re: Restrict Names 1.2a
Reply With Quote #275

Hi there, I was wondering if you could help me out, Brad
I want to know what needs be done to have the following things:

All symbols except "?", "^", "*" and "_" restricted. And all of the symbols allowed, should be allowed to use no more than once. So when a player changes his name into a nickname that contains "<" for example, he gets kicked and gets this feedback: "That symbol is not allowed! Please change your nick."

And if "Name?" changes his name into "Name??" he would get kicked and receive the following feedback: "You are not allowed to use that symbol more than once!"

I hope I've spoken clearly. I need only several examples of what to put in restrictnames.ini
Hence I can't figure it out on my own, my head is just too crowded, sorry for asking guidance like this, I guess I will have to wait for your reply whenever you have time on getting back to me

Thanks!
__________________

So close to the flame..
Lateseptember is offline
Send a message via AIM to Lateseptember Send a message via MSN to Lateseptember Send a message via Yahoo to Lateseptember Send a message via Skype™ to Lateseptember
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-28-2009 , 07:55   Re: Restrict Names 1.2a
Reply With Quote #276

It'd be easiest to use two separate expressions to do the two things you want.

In the first regex, allow letters, digits, and whitespace plus the allowable symbols. A name with any other characters should fail this regex. I'm not sure if the following would work, but it's what I'd start with:
Code:
^[\w\s\?\^\*_]+$
In the second regex, look for the allowed symbols being used more than once and fail the regex when that happens. This is a bit harder and not something I'm ready to look into this morning. I'll try to come back to this later (probably not today).
__________________
Brad is offline
Lateseptember
New Member
Join Date: Apr 2009
Location: Romania
Old 04-28-2009 , 08:41   Re: Restrict Names 1.2a
Reply With Quote #277

Thank you for your time. Doesn't matter if you're not in the mood, whenever's right for you is ok by me as long as I still get the answer in the long run.

What I don't really understand, which defines the punishment?
And shouldn't this

Code:
^[\w\s\?\^\*_]+$
Be this ?
Code:
^[\w\s\?\^\*\_]+$
That is, if I understood how exactly it works
If you could define everything, It would be much easier for me.
Thanks again!
__________________

So close to the flame..
Lateseptember is offline
Send a message via AIM to Lateseptember Send a message via MSN to Lateseptember Send a message via Yahoo to Lateseptember Send a message via Skype™ to Lateseptember
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-30-2009 , 20:23   Re: Restrict Names 1.2a
Reply With Quote #278

The expression I gave is correct. The underscore is not a reserved character and so it doesn't need to be escaped like the other characters.

You can review http://www.regular-expressions.info/ for a lot more information.
__________________
Brad is offline
Lateseptember
New Member
Join Date: Apr 2009
Location: Romania
Old 05-02-2009 , 10:44   Re: Restrict Names 1.2a
Reply With Quote #279

I added the line.
I entered the server with a name like Asdiaofa*
And it banned me via STEAMID :/

This is how restrictnames.ini looks like, since I didn't need the others I only left:

^(\(\d\))?player$ "'player' not allowed" 0 "Name was Prohibited"
[`~] "console key not allowed" 0 "Name had Console Key"
^.{1,2}$ "name length must be 3-26 characters" 0 "Name was too Short"
^.{27,}$ "name length must be 3-26 characters" 0 "Name was too Long"
^[\w\s\?\^\*_]+$

And when I tried to enter with the name Lateseptember, it kicked me saying I have an inappropriate name.

Furthermore,

L 05/02/2009 - 17:59:52: Gu3rIlA was kicked because "gu3rila" matched regex #5, "^[\w\s\?\^\*_]+$" ().
L 05/02/2009 - 17:59:55: Lateseptember was kicked because "lateseptember" matched regex #5, "^[\w\s\?\^\*_]+$" ().
L 05/02/2009 - 18:13:56: God? was kicked because "god?" matched regex #5, "^[\w\s\?\^\*_]+$" ().
L 05/02/2009 - 18:14:13: God? was kicked because "god?" matched regex #5, "^[\w\s\?\^\*_]+$" ().
__________________

So close to the flame..

Last edited by Lateseptember; 05-02-2009 at 11:20.
Lateseptember is offline
Send a message via AIM to Lateseptember Send a message via MSN to Lateseptember Send a message via Yahoo to Lateseptember Send a message via Skype™ to Lateseptember
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 05-02-2009 , 13:19   Re: Restrict Names 1.2a
Reply With Quote #280

Do you have a question?
__________________
Brad is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode