TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

#EVENT case sensitivity

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
nya



Joined: 25 Jun 2012
Posts: 39

PostPosted: Fri Jul 04, 2014 5:25 am    Post subject: #EVENT case sensitivity Reply with quote

It looks like #events are case sensitive, but 1. all events are capitalized anyway and 2. the output error message capitalizes it anyway, eg:

Quote:
#event {second} {#echo tick tock}
#EVENT {SECOND} IS NOT AN EXISTING EVENT.
#event {SECOND} {#echo tick tock}
#EVENT {SECOND} HAS BEEN SET TO {#echo tick tock}.


I notice strncmp() is being used, but there's a function in utils.c called strncasecmp() that looks like it might be better in this situation? Although events look like they're stored in a case sensitive manner, and some events might have case sensitive arguments, so there might need to be some extra work beyond that (since events have to be entered by their full name, could just capitalize X letters in the argument, where X is the name in the event_table).

Didn't write code for the above, but I could if it'd be helpful. :3
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3844

PostPosted: Sat Jul 05, 2014 8:06 am    Post subject: Reply with quote

I'll fix the capitalization.

Will keep events case sensitive to keep CPU usage as low as possible as events are called often.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group