--- deliantra/server/socket/request.C 2006/12/20 11:36:39 1.48 +++ deliantra/server/socket/request.C 2006/12/21 06:12:37 1.49 @@ -571,7 +571,10 @@ void AddMeCmd (char *buf, int len, client * ns) { - if (ns->status != Ns_Add || add_player (ns)) + if (INVOKE_CLIENT (ADDME, ns)) + return; + + if (ns->pl || add_player (ns)) ns->send_packet ("addme_failed"); else ns->send_packet ("addme_success"); @@ -815,11 +818,16 @@ pl->socket->send_packet (sl); } - /** This is a reply to a previous query. */ void -ReplyCmd (char *buf, int len, player *pl) +ReplyCmd (char *buf, int len, client *ns) { + if (!ns->pl) + return; //TODO: depends on the exact reply we are after + //TODO: but right now, we always have a ns->pl + + player *pl = ns->pl; + /* This is to synthesize how the data would be stored if it * was normally entered. A bit of a hack, and should be cleaned up * once all the X11 code is removed from the server. @@ -850,7 +858,6 @@ break; case ST_CHANGE_CLASS: - key_change_class (pl->ob, buf[0]); break;