diff options
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index e37bdf78..f7acda04 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -294,7 +294,7 @@ void ChatWindow::addTab(ChatTab *tab) logic(); } -void ChatWindow::removeWhisper(std::string nick) +void ChatWindow::removeWhisper(const std::string &nick) { mWhispers.erase(nick); } @@ -309,8 +309,8 @@ void ChatWindow::doPresent() { const Beings &beings = beingManager->getAll(); std::string response = ""; - unsigned short playercount = 0; - char cpc[25]; + int playercount = 0; + for (Beings::const_iterator bi = beings.begin(), be = beings.end(); bi != be; ++bi) { @@ -324,7 +324,9 @@ void ChatWindow::doPresent() ++playercount; } } - sprintf(cpc,"%u players are present.",playercount); + + std::string cpc = strprintf(_("%d players are present."), playercount); + if (mRecorder->isRecording()) { // Get the current system time @@ -339,7 +341,6 @@ void ChatWindow::doPresent() << (int) ((t / 60) % 60) << "] "; - mRecorder->record(timeStr.str() + _("Present: ") + response + _("; ") + cpc); getFocused()->chatLog(_("Attendance written to record log."), BY_SERVER, true); |