AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   users.ini case sensitivity problem (https://forums.alliedmods.net/showthread.php?t=47576)

user-cfg 11-21-2006 08:22

users.ini case sensitivity problem
 
can anyone tell me how to set names in users.ini to be case insensitive ? to be more specific: admin account "ModdER" should match also modder, MODDER, MoDdEr... and give him access regardless his name form. Pls excuse me for the spelling/topic mistakes :oops: Waiting 4 reply. 10x!

Simon Logic 11-21-2006 08:59

Re: users.ini case sensitivity problem
 
It's already done.

See admin.sma:
Code:

                else if (equali(t_arg, "name") || equali(t_arg, "nick"))
                {
                        idtype = ADMIN_NAME
                       
                        if (equali(t_arg, "name"))
                                idtype |= ADMIN_LOOKUP

Code:

/* Checks if two strings equal with case ignoring.
* If len var is set then there are only c chars comapred. */
native equali(const a[],const b[],c=0);

I checked source code for amx x 1.76b.

[ --<-@ ] Black Rose 11-21-2006 10:24

Re: users.ini case sensitivity problem
 
No.
Code:
getAccess(id, name[], authid[], ip[], password[]) { //...         /* line 583: */ else if (equal(name, g_aName[i])) //... }
Change it to equali.

Simon Logic 11-21-2006 10:34

Re: users.ini case sensitivity problem
 
[ --<-@ ] Black Rose, right you're. I was in hurry. Those were comparisons with key names like "name", "nick".

user-cfg 11-21-2006 14:47

Re: users.ini case sensitivity problem
 
Lots of thanks...that worked just fine.. 'till next time :P


All times are GMT -4. The time now is 06:48.

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