ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/login.C
(Generate patch)

Comparing deliantra/server/server/login.C (file contents):
Revision 1.23 by root, Wed Dec 13 03:28:42 2006 UTC vs.
Revision 1.24 by root, Thu Dec 14 04:30:32 2006 UTC

432 { 432 {
433 new_draw_info (NDI_UNIQUE, 0, op, " "); 433 new_draw_info (NDI_UNIQUE, 0, op, " ");
434 new_draw_info (NDI_UNIQUE, 0, op, "Wrong Password!"); 434 new_draw_info (NDI_UNIQUE, 0, op, "Wrong Password!");
435 new_draw_info (NDI_UNIQUE, 0, op, " "); 435 new_draw_info (NDI_UNIQUE, 0, op, " ");
436 op->name = op->name_pl = "noname"; 436 op->name = op->name_pl = "noname";
437 op->contr->socket.password_fails++; 437 op->contr->socket->password_fails++;
438 if (op->contr->socket.password_fails >= MAX_PASSWORD_FAILURES) 438 if (op->contr->socket->password_fails >= MAX_PASSWORD_FAILURES)
439 { 439 {
440 new_draw_info (NDI_UNIQUE, 0, op, "You gave an incorrect password too many times, you will now be dropped from the server."); 440 new_draw_info (NDI_UNIQUE, 0, op, "You gave an incorrect password too many times, you will now be dropped from the server.");
441 LOG (llevInfo, "A player connecting from %s has been dropped for password failure\n", op->contr->socket.host); 441 LOG (llevInfo, "A player connecting from %s has been dropped for password failure\n", op->contr->socket->host);
442 op->contr->socket.status = Ns_Dead; /* the socket loop should handle the rest for us */ 442 op->contr->socket->status = Ns_Dead; /* the socket loop should handle the rest for us */
443 } 443 }
444 else 444 else
445 get_name (op); 445 get_name (op);
446 446
447 return; /* Once again, rest of code just loads the char */ 447 return; /* Once again, rest of code just loads the char */
667 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL, "%s has entered the game.", &pl->ob->name); 667 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL, "%s has entered the game.", &pl->ob->name);
668 668
669 INVOKE_PLAYER (LOAD, pl, ARG_STRING (filename)); 669 INVOKE_PLAYER (LOAD, pl, ARG_STRING (filename));
670 INVOKE_PLAYER (LOGIN, pl); 670 INVOKE_PLAYER (LOGIN, pl);
671 671
672 op->contr->socket.update_look = 1; 672 op->contr->socket->update_look = 1;
673
673 /* If the player should be dead, call kill_player for them 674 /* If the player should be dead, call kill_player for them
674 * Only check for hp - if player lacks food, let the normal 675 * Only check for hp - if player lacks food, let the normal
675 * logic for that to take place. If player is permanently 676 * logic for that to take place. If player is permanently
676 * dead, and not using permadeath mode, the kill_player will 677 * dead, and not using permadeath mode, the kill_player will
677 * set the play_again flag, so return. 678 * set the play_again flag, so return.
681 new_draw_info (NDI_UNIQUE, 0, op, "Your character was dead last your played."); 682 new_draw_info (NDI_UNIQUE, 0, op, "Your character was dead last your played.");
682 kill_player (op); 683 kill_player (op);
683 if (pl->state != ST_PLAYING) 684 if (pl->state != ST_PLAYING)
684 return; 685 return;
685 } 686 }
687
686 LOG (llevInfo, "LOGIN: Player named %s from ip %s\n", &op->name, op->contr->socket.host); 688 LOG (llevInfo, "LOGIN: Player named %s from ip %s\n", &op->name, op->contr->socket->host);
687 689
688 /* Do this after checking for death - no reason sucking up bandwidth if 690 /* Do this after checking for death - no reason sucking up bandwidth if
689 * the data isn't needed. 691 * the data isn't needed.
690 */ 692 */
691 esrv_new_player (op->contr, op->weight + op->carrying); 693 esrv_new_player (op->contr, op->weight + op->carrying);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines