Changeset 8a3ef42 in network-game for server


Ignore:
Timestamp:
Dec 31, 2012, 1:23:50 AM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
11402be
Parents:
eb8adb1
Message:

Fixed a bug where the server message type wsasn't being set correctly for user logout messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/server.cpp

    reb8adb1 r8a3ef42  
    235235         {
    236236            strcpy(serverMsg.buffer, "That player is not logged in. This is either a bug, or you're trying to hack the server.");
     237            cout << "Player not logged in" << endl;
    237238         }
    238239         else if ( p->addr.sin_addr.s_addr != from.sin_addr.s_addr ||
     
    240241         {
    241242            strcpy(serverMsg.buffer, "That player is logged in using a differemt connection. This is either a bug, or you're trying to hack the server.");
     243            cout << "Player logged in using a different connection" << endl;
    242244         }
    243245         else
     
    247249            mapPlayers.erase(p->id);
    248250            strcpy(serverMsg.buffer, "You have successfully logged out.");
    249          }
     251            cout << "Player logged out successfuly" << endl;
     252         }
     253
     254         // should really be serverMsg.type = MSG_TYPE_LOGOUT;
     255         serverMsg.type = MSG_TYPE_LOGIN;
    250256
    251257         break;
Note: See TracChangeset for help on using the changeset viewer.