- Timestamp:
- Dec 3, 2012, 12:33:35 AM (12 years ago)
- Branches:
- master
- Children:
- b53c6b3
- Parents:
- 41ad8ed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/server.cpp
r41ad8ed rcbc595d 40 40 vector<Player>::iterator it; 41 41 42 cout << "Entered findPlayerByName" << endl;43 44 42 for (it = vec.begin(); it != vec.end(); it++) 45 43 { 46 cout << "Comparing name" << endl;47 44 if ( it->name.compare(name) == 0 ) 48 45 return &(*it); 49 46 } 50 47 51 cout << "About to return" << endl;52 48 return NULL; 53 49 } … … 79 75 int sock, length, n; 80 76 struct sockaddr_in server; 81 struct sockaddr_in from; // holds the info onthe connected client77 struct sockaddr_in from; // holds the info about the connected client 82 78 NETWORK_MSG clientMsg, serverMsg; 83 79 vector<Player> vctPlayers; 84 80 85 81 srand(time(NULL)); 86 int num = 500; 87 //int num = (rand() % 0) + 1; 82 int num = (rand() % 1000) + 1; 88 83 89 84 cout << "num: " << num << endl; … … 172 167 if (p == NULL || p->password != password) 173 168 { 174 if (p != NULL)175 {176 cout << "p->password: " << p->password << endl;177 cout << "password: " << password << endl;178 }179 169 strcpy(serverMsg.buffer, "Incorrect username or password"); 180 170 }
Note:
See TracChangeset
for help on using the changeset viewer.