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
➜ Issues during login
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Alkarindil
Brazil (70 posts) Bio
|
| Date
| Sat 22 Jan 2011 12:54 AM (UTC) Amended on Sat 22 Jan 2011 12:58 AM (UTC) by Alkarindil
|
| Message
| Hi there!
I was looking for an older version of my SMAUG codes to get some snippets I am not able to find again on the Internet. So I decided to code in this older version.
The thing is: everytime I try to do the login, I get an error in the nanny function.
By the first attempt, this condition becomes true and it returns an error:
if(!check_parse_name(argument, (d->newstate != 0))){
//error
return;
}
In the second attempt it works fine.
I used some printf in the server and I discovered that in the first time I write the nickname, the argument passed to nanny is (without the cotes): " 'lordrom"; with a space, an apostrophe and then the name.
Once the argument is passed, the function get rid of the space, but the apostrophe remains.
I am looking for the root of this problem, but I wasn't able to find it. Can you help-me?
This is part of the nanny code:
void nanny( DESCRIPTOR_DATA *d, char *argument )
{
char buf[MAX_STRING_LENGTH];
char arg[MAX_STRING_LENGTH];
CHAR_DATA *ch;
char *pwdnew;
char *p;
int iClass;
int iRace;
int iTown;
extern int top_nation;
bool fOld, chk;
printf("1. %s\n\r", argument);
while ( isspace(*argument) )
argument++;
printf("2. %s\n\r", argument);
ch = d->character;
switch ( d->connected ){
default:
bug( "Nanny: bad d->connected %d.", d->connected );
close_socket( d, TRUE );
return;
//-----------------------------------
case CON_GET_NAME:
if ( argument[0] == '\0' ){
close_socket( d, FALSE );
return;
}
argument[0] = UPPER(argument[0]);
/* Old players can keep their characters. -- Alty */
if ( !check_parse_name( argument, (d->newstate != 0) ) ){
write_to_buffer( d, "Prohibited name. Please try again.\n\rName: ", 0 ); //this is the error
return;
}
(...)
This is the MUD window:
[welcome things]
Enter your character's name, or type new: lordrom
Prohibited name. Please try again.
Name: lordrom
Password:
And this is what I get in the console. Take a look in the password (123) and the way the nickname first appear and how my second try goes.
Fri Jan 21 22:52:03 2011 :: Sock.sinaddr: 127.0.0.1, port 1572.
Fri Jan 21 22:52:03 2011 :: [*****] BUG: Auth_open: connection refused
1. 'lordrom
2. 'lordrom
1. lordrom
2. lordrom
Fri Jan 21 22:52:10 2011 :: Preloading player data for: Lordrom (0K)
1. 123
2. 123
Fri Jan 21 22:52:11 2011 :: Loading player data for: Lordrom (0K)
Fri Jan 21 22:52:11 2011 :: Lordrom@127.0.0.1((connect refused)) is connected.
Hope you can help-me, this thing is starting to bother me.
Thanks in advance! | | Top |
|
| Posted by
| Nick Gammon
Australia (23,166 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sat 22 Jan 2011 02:44 AM (UTC) |
| Message
|
Alkarindil said:
By the first attempt, this condition becomes true and it returns an error:
if(!check_parse_name(argument, (d->newstate != 0))){
//error
return;
}
In the second attempt it works fine.
Do you mean the first attempt after you start Smaug, or the first attempt at this client? I seem to recall that under certain circumstances the telnet negotiation (eg NAWS) was sending characters that were being taken as the name or password by the server. If you are using an older version of Smaug, it may not have the more modern telnet negotiation handling in the comms module.
I would try turning on packet debug in the client (if you are using MUSHclient) and seeing exactly what the client is sending. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Alkarindil
Brazil (70 posts) Bio
|
| Date
| Reply #2 on Thu 27 Jan 2011 02:18 PM (UTC) |
| Message
| Well, I gave up setting this. I am moving to a Linux-based code and I shall try to apply the same snippets.
The thing is.. I cannot find those snippets anymore! x( | | Top |
|
| Posted by
| Conner
USA (381 posts) Bio
|
| Date
| Reply #3 on Sun 30 Jan 2011 07:37 AM (UTC) Amended on Sun 30 Jan 2011 07:48 AM (UTC) by Conner
|
| Message
| One might ask which snippets you're unable to find in case one has a copy of them archived somewhere or knows where to find them... ;)
[Edit] Oops, nevermind, I see this was already addressed in another thread at |
-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.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.
22,024 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top