mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
restructured protocol code
This commit is contained in:
parent
122f8ea916
commit
694070724c
32 changed files with 1202 additions and 2081 deletions
|
|
@ -11,9 +11,10 @@ void Server_ChatChannel::addClient(Server_ProtocolHandler *client)
|
|||
sendChatEvent(new Event_ChatJoinChannel(name, client->getPlayerName()));
|
||||
append(client);
|
||||
|
||||
Event_ChatListPlayers *eventCLP = new Event_ChatListPlayers(name);
|
||||
QList<ServerInfo_ChatUser *> eventUserList;
|
||||
for (int i = 0; i < size(); ++i)
|
||||
eventCLP->addPlayer(at(i)->getPlayerName());
|
||||
eventUserList.append(new ServerInfo_ChatUser(at(i)->getPlayerName()));
|
||||
Event_ChatListPlayers *eventCLP = new Event_ChatListPlayers(name, eventUserList);
|
||||
client->enqueueProtocolItem(eventCLP);
|
||||
|
||||
client->enqueueProtocolItem(new Event_ChatSay(name, QString(), joinMessage));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue