user banning

This commit is contained in:
Max-Wilhelm Bruker 2011-03-03 01:16:13 +01:00
parent 6145d6d524
commit 57f9e2c3b4
27 changed files with 220 additions and 37 deletions

View file

@ -132,7 +132,7 @@ TabRoom::TabRoom(TabSupervisor *_tabSupervisor, AbstractClient *_client, const Q
gameTypes.insert(gameTypeList[i]->getGameTypeId(), gameTypeList[i]->getDescription());
gameSelector = new GameSelector(client, this);
userList = new UserList(tabSupervisor->getUserListsTab(), client, UserList::RoomList);
userList = new UserList(tabSupervisor, client, UserList::RoomList);
connect(userList, SIGNAL(openMessageDialog(const QString &, bool)), this, SIGNAL(openMessageDialog(const QString &, bool)));
chatView = new ChatView(ownName);
@ -205,10 +205,18 @@ void TabRoom::sendMessage()
if (sayEdit->text().isEmpty())
return;
client->sendCommand(new Command_RoomSay(roomId, sayEdit->text()));
Command_RoomSay *cmd = new Command_RoomSay(roomId, sayEdit->text());
connect(cmd, SIGNAL(finished(ProtocolResponse *)), this, SLOT(sayFinished(ProtocolResponse *)));
client->sendCommand(cmd);
sayEdit->clear();
}
void TabRoom::sayFinished(ProtocolResponse *response)
{
if (response->getResponseCode() == RespChatFlood)
chatView->appendMessage(QString(), tr("You are flooding the chat. Please wait a couple of seconds."));
}
void TabRoom::actLeaveRoom()
{
client->sendCommand(new Command_LeaveRoom(roomId));