Raised This Month: $ Target: $400
 0% 

users.ini case sensitivity problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
user-cfg
Junior Member
Join Date: Nov 2006
Old 11-21-2006 , 08:22   users.ini case sensitivity problem
Reply With Quote #1

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 Waiting 4 reply. 10x!
user-cfg is offline
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 11-21-2006 , 08:59   Re: users.ini case sensitivity problem
Reply With Quote #2

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.
Simon Logic is offline
Send a message via Skype™ to Simon Logic
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-21-2006 , 10:24   Re: users.ini case sensitivity problem
Reply With Quote #3

No.
Code:
getAccess(id, name[], authid[], ip[], password[]) { //...         /* line 583: */ else if (equal(name, g_aName[i])) //... }
Change it to equali.
[ --<-@ ] Black Rose is offline
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 11-21-2006 , 10:34   Re: users.ini case sensitivity problem
Reply With Quote #4

[ --<-@ ] Black Rose, right you're. I was in hurry. Those were comparisons with key names like "name", "nick".
Simon Logic is offline
Send a message via Skype™ to Simon Logic
user-cfg
Junior Member
Join Date: Nov 2006
Old 11-21-2006 , 14:47   Re: users.ini case sensitivity problem
Reply With Quote #5

Lots of thanks...that worked just fine.. 'till next time
user-cfg is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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