Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Illegal name, capital letters
|
Illegal name, capital letters
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Mon 07 Mar 2005 10:47 PM (UTC) |
| 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
|
| Date
| Reply #1 on Mon 07 Mar 2005 11:30 PM (UTC) |
| 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,871 posts) Bio
|
| Date
| Reply #2 on Mon 07 Mar 2005 11:33 PM (UTC) |
| 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
|
| Date
| Reply #3 on Mon 07 Mar 2005 11:48 PM (UTC) |
| 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,871 posts) Bio
|
| Date
| Reply #4 on Mon 07 Mar 2005 11:52 PM (UTC) 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
|
| Date
| Reply #5 on Mon 07 Mar 2005 11:56 PM (UTC) |
| 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,871 posts) Bio
|
| Date
| Reply #6 on Tue 08 Mar 2005 12:02 AM (UTC) |
| 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) |
| 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,871 posts) Bio
|
| Date
| Reply #8 on Tue 08 Mar 2005 04:16 PM (UTC) |
| 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.
26,943 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top