Skip to content

Commit

Permalink
Remove unneeded check
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Oct 31, 2015
1 parent e59625f commit 19ecec7
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions src/server.cpp
Expand Up @@ -2798,26 +2798,23 @@ std::wstring Server::handleChat(const std::string &name, const std::wstring &wna
line += wmessage;
}


if (line != L"") {
/*
Tell calling method to send the message to sender
*/
if (!broadcast_line) {
return line;
} else {
/*
Tell calling method to send the message to sender
Send the message to others
*/
if (!broadcast_line) {
return line;
} else {
/*
Send the message to others
*/
actionstream << "CHAT: " << wide_to_narrow(line) << std::endl;
actionstream << "CHAT: " << wide_to_narrow(line) << std::endl;

std::vector<u16> clients = m_clients.getClientIDs();
std::vector<u16> clients = m_clients.getClientIDs();

for (u16 i = 0; i < clients.size(); i++) {
u16 cid = clients[i];
if (cid != peer_id_to_avoid_sending)
SendChatMessage(cid, line);
}
for (u16 i = 0; i < clients.size(); i++) {
u16 cid = clients[i];
if (cid != peer_id_to_avoid_sending)
SendChatMessage(cid, line);
}
}
return L"";
Expand Down

0 comments on commit 19ecec7

Please sign in to comment.