|
Illegal name, capital letters
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Mon 07 Mar 2005 10:47 PM (UTC) [ quote
] |
| Message |
One of the name rules in Smaug is this...
- Comprised of various capital letters, such as 'BrACkkA' or 'CORTO'.
Yet they never hard coded that rule in, and that's what I'd like to do. Make names with capital letters (besides first letter of course) illegal. I know what function to modify and the basic idea how to do it, but not how to actual code it in... |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | top |
|
| Posted by |
David Haley
USA (3,881 posts) bio
Moderator |
| Date |
Reply #1 on Mon 07 Mar 2005 11:30 PM (UTC) [ quote
] |
| Message |
| Why not just 'tolower' every letter except the first? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #2 on Mon 07 Mar 2005 11:33 PM (UTC) [ quote
] |
| Message |
| Because then people who make "DemonSlayer" will have the name still go through. I think its better just to make these type of names illegal since people who try two word names will try it without a space next. Demon Slayer -> DemonSlayer. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | top |
|
| Posted by |
David Haley
USA (3,881 posts) bio
Moderator |
| Date |
Reply #3 on Mon 07 Mar 2005 11:48 PM (UTC) [ quote
] |
| Message |
| But then they can type 'Demonslayer' and it'll work, so I'm not sure I see what the difference is. I'm just suggesting that you take whatever they typed, run it against other checks, and then when it's acceptable otherwise, convert all letters to lowercase except the first one. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #4 on Mon 07 Mar 2005 11:52 PM (UTC) [ quote
] Amended on Mon 07 Mar 2005 11:56 PM (UTC) by Zeno
|
| Message |
Yeah, might as well. Now the problem is, I've searched through comm.c and I could not find where it would set ch->name on a new character.
[EDIT] What if I just did:
Or something like that? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | top |
|
| Posted by |
David Haley
USA (3,881 posts) bio
Moderator |
| Date |
Reply #5 on Mon 07 Mar 2005 11:56 PM (UTC) [ quote
] |
| Message |
| I think it actually uses load_char or something weird like that on a new character. I can't conveniently access the code right now (in class) but I think it's in save.c. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #6 on Tue 08 Mar 2005 12:02 AM (UTC) [ quote
] |
| Message |
Well that was actually easy. Anything wrong with this?
case CON_GET_NAME:
if ( argument[0] == '\0' )
{
close_socket( d, FALSE );
return;
}
argument[0] = UPPER(argument[0]);
argument = capitalize(argument);
I mean it works fine and everything. *shrug* |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | top |
|
| Posted by |
Asean Novari
USA (82 posts) bio
|
| Date |
Reply #7 on Tue 08 Mar 2005 03:25 PM (UTC) [ quote
] |
| Message |
Well i agree with the whole illegal name on the Demonslayer
issue.. but as for the capitol letter thing.. what about
people who want to have names like Jar'Kol... anyhoo.. just
my 2 cents |
| top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #8 on Tue 08 Mar 2005 04:16 PM (UTC) [ quote
] |
| Message |
| You mean you want to allow that name? You'd have to change the player struct around a bit, so it won't save that as a filename, or it'll strip symbols. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
2,050 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )