For some reason you are opening the same Database file twice and only closing one. Over time this quickly makes the Linux system reach its maximum opened file limit which causes unwanted behaviour such as the server not being able to write to the samp.ban file and so on. Also you forgot to free the result from the first query in GetIPCountry.
For some reason you are opening the same Database file twice and only closing one. Over time this quickly makes the Linux system reach its maximum opened file limit which causes unwanted behaviour such as the server not being able to write to the samp.ban file and so on. Also you forgot to free the result from the first query in GetIPCountry.