don't pm people ignoring you

This commit is contained in:
Max-Wilhelm Bruker 2011-03-02 16:34:36 +01:00
parent 0afdbc7222
commit 1bee788210
9 changed files with 36 additions and 5 deletions

View file

@ -45,10 +45,18 @@ void TabMessage::sendMessage()
if (sayEdit->text().isEmpty() || !userOnline)
return;
client->sendCommand(new Command_Message(userName, sayEdit->text()));
Command_Message *cmd = new Command_Message(userName, sayEdit->text());
connect(cmd, SIGNAL(finished(ProtocolResponse *)), this, SLOT(messageSent(ProtocolResponse *)));
client->sendCommand(cmd);
sayEdit->clear();
}
void TabMessage::messageSent(ProtocolResponse *response)
{
if (response->getResponseCode() == RespInIgnoreList)
chatView->appendMessage(QString(), tr("This user is ignoring you."));
}
void TabMessage::actLeave()
{
deleteLater();