few things about saving nicks(really important to me)
in client_connect i want to grab that players nick, store it(only to memory), and when he connects again check if the same nick is stored, if yes - count to 4 more attempts and then ban(5 minutes), on each round start delete all the nicks stored
i really need this, pls help me guys |
Re: few things about saving nicks(really important to me)
I really dunno why do you need this, but anyway here is code of this simple plugin:
PHP Code:
|
Re: few things about saving nicks(really important to me)
thx a lot, ive needed this couse ppl are just bashing with connects to get to my server
|
Re: few things about saving nicks(really important to me)
I tested this and not working:| !...hum...
*I see you check if name was on server,but i don't see where you store the name..:/ |
Re: few things about saving nicks(really important to me)
You do g_last_name_pos = 0 in logevent_round_start() but then you do this
Code:
for(new i=1; i<=g_last_name_pos; i++){ |
Re: few things about saving nicks(really important to me)
yeah.... i<0 :|...how should i make?:D
|
Re: few things about saving nicks(really important to me)
I coded this in like 10 minutes and then checked with bots and it worked.
All names are stored in g_stored_names[MAX_NAMES+1][33] array (isn't it obvious? - look at name), lines: Code:
You should analyze whole algorithm... I set g_last_name_pos = 0 in logevent_round_start() to reset names (g_last_name_pos==0 means no names stored). "for" loop is for linear search in g_stored_names array. If there are no names stored then it shouldnt start any search, instead it will store player name in first empty cell in g_stored_names array. On next connection attempts g_last_name_pos will be >=1, so it will start the search... |
Re: few things about saving nicks(really important to me)
hum...i tested my self,with server empty...that should be the problem! :)
|
| All times are GMT -4. The time now is 10:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.