#1

well, i uses
Код:
new file[256];
new name[256];
GetPlayerName(playerid,name,sizeof(name));
format(file,sizeof(file),SERVER_USER_FILE,name);
if(fexist(file))
{
SendClientMessage(playerid,COLOR_ORED,"Account registered! /login to restore your data!");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_ORED,"Account not registered! /register to restore your data!");
return 1;
}
but the problem is, if registered with Rudy. but when i enter with rudy, it will ask me to register again, is it case sensitive? and if it is, many people can just use an admin name with lower case.
Any solutions?
Reply
#2

Are you creating the scriptfiles? its seens be the problem
Reply
#3

Noo. Here it goes.

I registered with the name 'Rudy' .
But when i enter with the name 'RuDy' or somesort of upper-case in any of the letter, it will says

'Account not registered! /register to register an account.'

but in scriptfiles, there is the file Rudy.ini .
Reply
#4

Yes, cause pawno sees them as different.
Reply
#5

no way to change it? People can just enter with different caps and will just pretend tat they are admin.
Reply
#6

I dont know any way how you could make this. Sorry.
Reply
#7

Okay, Nice signature btw.
Reply
#8

fexist(filename) is not case sensative, so of there is a user file 'Rachael.ini'
pawn Код:
fexist("Rachael.ini") = true
fexist("rachael.ini") = true
fexist("RACHAEL.ini") = true
I think in the case you have described where someone logs in with your name with a different case, it will find the user file and ask for your password as normal.

Furthermore, I think if the server re-writes the user file with 'fopen(file,io_write);' it will not alter the case of the original file.

I have deduced this information after testing this on my server, and if your login system differs from mine then what I have said may not apply.

[edit] I tested this on my local test server and then on my hosted server, for some reason the results were different, so disregard what I have posted above.
Reply
#9

It is possible that on a windows server fexist is not case sensitive, but on a linux server, apparantly, it is.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)