The following is a snippet from the end of the "do_quit" function in ROM
2.4b6. I don't know if earlier versions (or the version you're dealing with)
has this in it, but it seems to have worked well for our mud (ROM 2.4b6
based) for the past several years.
It also works well enough that since I have modified our multi-play check to
work 100% off the descriptor_list instead of the ch_list, we haven't had any
issues with sockets being left open after logoff.
/**************************************************************************/
/*
* After extract_char the ch is no longer valid!
*/
save_char_obj( ch );
id = ch->id;
d = ch->desc;
extract_char( ch, TRUE );
if ( d != NULL )
close_socket( d );
/* toast evil cheating bastards */
for (d = descriptor_list; d != NULL; d = d_next)
{
CHAR_DATA *tch;
d_next = d->next;
tch = d->original ? d->original : d->character;
if (tch && tch->id == id)
{
extract_char(tch,TRUE);
close_socket(d);
}
}
return;
/**********************************************************************/
Hope this helps someone.
- Valnir
----- Original Message -----
From: "Christopher Bunting" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, March 26, 2005 11:38 AM
Subject: Quit / Logout Bug
Hi All,
Recently I noticed that there seems to be a bug that spans from Merc
into every deriv that was created there after. It may not be codebase
specific but this is what I have found..
There are various mud clients as well as the free one that I prefer
called RoaClient. I noticed one day that when I logged out of the test
mud as a player, I typed the quit. I did quit but what I noticed was
that I had quit but there was still a partial connection. After I did
this a couple other times with other play test chars of mine, various
things would happen.. One being that I could no longer get the login
greeting to show, the mud would overflow with connections and just
hang or the mud would simply crash.
I know this happens on all derivs of Merc, Envy and Rom and so on.
Smaug may not have this problem as they have coded their do_quit
function a bit different.. May have some other code in there as well
but I never messed with smaug, only rom and envy.
So the point being, you should check this out.. Especially if you are
running a mud with a good sized playbase. There are no warnings or
errors for this problem and thats why it's been undetected since the
first release of Merc I assume.
Regards,
Chris
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom