Changeset 6910 for code/branches/chat2/src/orxonox/ChatHistory.cc
- Timestamp:
- May 17, 2010, 3:22:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/chat2/src/orxonox/ChatHistory.cc
r6846 r6910 80 80 std::string text; 81 81 82 //COUT(0) << "Meow.\n";83 84 82 #ifndef CHATTEST 83 /* get sender ID and prepend it to the message */ 85 84 if (senderID != CLIENTID_UNKNOWN) 86 85 { 87 std::string name = "unknown"; 88 PlayerInfo* player = PlayerManager::getInstance().getClient(senderID); 89 if (player) 90 name = player->getName(); 86 /* if we can't find anything, use "unknown" as default */ 87 std::string name = "unknown"; 91 88 92 text = name + ": " + message; 89 PlayerInfo* player = PlayerManager::getInstance().getClient(senderID); 90 if (player) 91 name = player->getName(); 92 93 text = name + ": " + message; 93 94 } 94 95 else … … 164 165 void ChatHistory::chat_hist_closelog() 165 166 { 167 /* see if we've actually got a logfile */ 166 168 if( this->hist_logfile ) 167 { this->chat_hist_logline( "--- Logfile closed ---" ); 169 { 170 /* yes, we've got one, add a line that shows we're closing it */ 171 this->chat_hist_logline( "--- Logfile closed ---" ); 172 173 /* actually close down the file */ 168 174 this->hist_logfile.close(); 169 175 }
Note: See TracChangeset
for help on using the changeset viewer.