mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 16:43:55 -07:00
initial commit for chat channels
This commit is contained in:
parent
0d84de2384
commit
947cd1736c
23 changed files with 408 additions and 66 deletions
25
servatrice/src/chatchannel.h
Normal file
25
servatrice/src/chatchannel.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef CHATCHANNEL_H
|
||||
#define CHATCHANNEL_H
|
||||
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
|
||||
class ServerSocket;
|
||||
|
||||
class ChatChannel : public QObject, public QList<ServerSocket *> {
|
||||
Q_OBJECT
|
||||
signals:
|
||||
void channelInfoChanged();
|
||||
private:
|
||||
QString name;
|
||||
QString description;
|
||||
public:
|
||||
ChatChannel(const QString &_name, const QString &_description);
|
||||
QString getName() const { return name; }
|
||||
QString getDescription() const { return description; }
|
||||
void addPlayer(ServerSocket *player);
|
||||
void removePlayer(ServerSocket *player);
|
||||
void say(ServerSocket *player, const QString &s);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue