IP Ban system
#2

The way I would do this is by checking if any text has been entered in 'cmdreason'.

You can check this by the sample of code written below. You can also set a max size of the string length so it's not cut off if people enter a message longer than 100 characters by using strlen.
PHP код:
if (isnull(cmdreason)) // Checking if any reason is entered.
        
return false// Returns a false value 
Going back to your IP question, you can simply update the IP by saving the new one every time the player disconnects. This keeps an IP in the players .ini file all the time.

If you're saying that when the IP is shown in a players file, he is banned.. The 'banned' line in your .txt file is a better way of saying the player is banned, you shouldn't be detecting if an IP is shown to say if he is banned.

I don't know, I may not have understood what you have been trying to say and I am sorry if I have.

- Firewire
Reply


Messages In This Thread
IP Ban system - by _Khaled_ - 29.06.2013, 20:53
Re: IP Ban system - by Firewire - 29.06.2013, 23:21
Re: IP Ban system - by _Khaled_ - 29.06.2013, 23:35
Re: IP Ban system - by _Khaled_ - 30.06.2013, 01:50
Re: IP Ban system - by _Khaled_ - 30.06.2013, 01:54
Re: IP Ban system - by _Khaled_ - 30.06.2013, 02:40
Re: IP Ban system - by Lordzy - 30.06.2013, 04:02
Re: IP Ban system - by _Khaled_ - 30.06.2013, 12:45
Re: IP Ban system - by _Khaled_ - 30.06.2013, 18:57

Forum Jump:


Users browsing this thread: 1 Guest(s)