mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-23 23:23:55 -07:00
Chat works!
This commit is contained in:
parent
1baa188067
commit
64aa68cd26
28 changed files with 714 additions and 424 deletions
|
|
@ -2,19 +2,19 @@
|
|||
method=none
|
||||
|
||||
[database]
|
||||
type=mysql
|
||||
type=none
|
||||
hostname=localhost
|
||||
database=servatrice
|
||||
user=servatrice
|
||||
password=foobar
|
||||
|
||||
[messages]
|
||||
login="Example line 1", "Example line 2"
|
||||
login="Example line"
|
||||
|
||||
[chatchannels]
|
||||
size=1
|
||||
1\name="General Chat"
|
||||
1\description="Discuss anything here."
|
||||
1\autojoin=true
|
||||
1\joinmessage="This is the general chat channel.", "This message is only here to show that channels can have a join message."
|
||||
1\joinmessage="This is the general chat channel. This message is only here to show that channels can have a join message."
|
||||
|
||||
|
|
|
|||
|
|
@ -121,4 +121,4 @@ AuthenticationResult Servatrice::checkUserPassword(const QString &user, const QS
|
|||
return UnknownUser;
|
||||
}
|
||||
|
||||
const QString Servatrice::versionString = "Servatrice 0.20091103";
|
||||
const QString Servatrice::versionString = "Servatrice 0.20091113";
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ ServerSocketInterface::ServerSocketInterface(Server *_server, QTcpSocket *_socke
|
|||
xmlWriter->writeStartElement("cockatrice_server_stream");
|
||||
xmlWriter->writeAttribute("version", QString::number(ProtocolItem::protocolVersion));
|
||||
|
||||
sendProtocolItem(new Event_ChatServerMessage(QString(), Servatrice::versionString));
|
||||
sendProtocolItem(new Event_ServerMessage(Servatrice::versionString));
|
||||
}
|
||||
|
||||
ServerSocketInterface::~ServerSocketInterface()
|
||||
|
|
@ -52,19 +52,10 @@ ServerSocketInterface::~ServerSocketInterface()
|
|||
delete xmlWriter;
|
||||
delete xmlReader;
|
||||
delete socket;
|
||||
/* clearZones();
|
||||
// The socket has to be removed from the server's list before it is removed from the game's list
|
||||
// so it will not receive the game update event.
|
||||
server->removePlayer(this);
|
||||
if (game)
|
||||
game->removePlayer(this);
|
||||
for (int i = 0; i < chatChannels.size(); ++i)
|
||||
chatChannels[i]->removePlayer(this);
|
||||
*/}
|
||||
}
|
||||
|
||||
void ServerSocketInterface::readClient()
|
||||
{
|
||||
qDebug() << "readClient";
|
||||
xmlReader->addData(socket->readAll());
|
||||
|
||||
if (currentItem) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue