Skip to content

Instantly share code, notes, and snippets.

@oppahero
Created November 9, 2018 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oppahero/049dbda13709446fd0bc1eda2e125b9d to your computer and use it in GitHub Desktop.
Save oppahero/049dbda13709446fd0bc1eda2e125b9d to your computer and use it in GitHub Desktop.
void Server::on_client_privateTextSend(QString uname,QString receiverName,QString text){
QString currentTime = QTime::currentTime().toString("H:mm A/");
QString messagePm = "/pm:"+currentTime+uname+" : "+text+"\n";
foreach(ClientThread* client,clientThreadList){
if(client->getUsername() == receiverName){
sendTextToOne(messagePm,client);
return;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment