Raised This Month: $ Target: $400
 0% 

How to check name change?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
turshija
Member
Join Date: Jan 2009
Old 10-10-2009 , 16:56   How to check name change?
Reply With Quote #1

Hello ...
I'm developing anti IP spam in chat, and I've managed to make everything except one thing ...
Block IP address in name ...

Now, I know how to get players name and check if its IP ...
How do I check if player changed his name during game?
Is there something like public name_change(id) function that does every time player changes his name ?
Because I think checking players name in public client_connect is not really smart thing ...
turshija is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-10-2009 , 17:05   Re: How to check name change?
Reply With Quote #2

http://www.amxmodx.org/funcwiki.php?go=func&id=8
__________________
xPaw is offline
turshija
Member
Join Date: Jan 2009
Old 10-10-2009 , 17:19   Re: How to check name change?
Reply With Quote #3

thanks
K+

edit: oh and by the way ... Now I have to check players name in client_connect and in client_infochanged ?

Last edited by turshija; 10-10-2009 at 17:24.
turshija is offline
vitorrd
Senior Member
Join Date: Jul 2009
Old 10-10-2009 , 17:40   Re: How to check name change?
Reply With Quote #4

Quote:
Originally Posted by turshija View Post
thanks
K+

edit: oh and by the way ... Now I have to check players name in client_connect and in client_infochanged ?
Isn't it better to use their Steam ID instead of their names?
get_user_authid: http://www.amxmodx.org/funcwiki.php?go=func&id=166
vitorrd is offline
turshija
Member
Join Date: Jan 2009
Old 10-10-2009 , 17:46   Re: How to check name change?
Reply With Quote #5

Dude ...
Did you read my first post at all ? o_O
I need player name because I have to check if he named himself by an IP ... :S
For example, some kiddie puts his servers IP in his name and goes to another server and stars spamming "JOIN THIS SERVER BLABLABLA" ...

Last edited by turshija; 10-10-2009 at 17:52.
turshija is offline
vitorrd
Senior Member
Join Date: Jul 2009
Old 10-10-2009 , 17:50   Re: How to check name change?
Reply With Quote #6

Quote:
Originally Posted by turshija View Post
Dude ...
Did you read my first post at all ? o_O
I need player name to check if he named himself by an IP ... :S
For example, some kiddie puts his servers IP in his name and goes to another server and stars spamming "JOIN THIS SERVER BLABLABLA" ...
I'll try being nice about this: Your english sucks, therefore you should watch how you talk to people. Moreover, you could waste your precious time testing whether client_infochanged is called upon connection or not instead of wasting it disrespecting people that don't understand your lame english.
vitorrd is offline
turshija
Member
Join Date: Jan 2009
Old 10-10-2009 , 17:55   Re: How to check name change?
Reply With Quote #7

Good job being an arrogant fool ...
Not everyone on this forum is native english speaker ...


One more question intended to people that are more friendly:
How do I change players name?
I don't see any set_user_name command ...
turshija is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-10-2009 , 19:06   Re: How to check name change?
Reply With Quote #8

set_user_info(id, "name", "NewNameHere")

More offensive :
client_cmd(id, "name NewName")
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
turshija
Member
Join Date: Jan 2009
Old 10-10-2009 , 19:31   Re: How to check name change?
Reply With Quote #9

thanks!
I will K+ you when my karma recharges ...
turshija is offline
turshija
Member
Join Date: Jan 2009
Old 10-10-2009 , 20:12   Re: How to check name change?
Reply With Quote #10

hmm ...
for some strange reason, I can't get this to work ... :S
I have
PHP Code:
public client_infochanged(id


    (
check if name is allowed)

    
     if (
name not allowed) {
    
log(id,"Name not allowed!");
    
client_cmd(id"name changeme")
    }
    

i've tried with client_cmd, set_user_info and same as set_task(0.1, "change_name", id) with this function:
PHP Code:
public change_name(id)
{
    
client_cmd(id"name changeme")

but all I get when I change name to the not allowed one during game I get messages:

[not allowed name] changed name to "changeme"
but my name stays the same ... :S
turshija is offline
Reply


Thread Tools
Display Modes

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 22:35.


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