Added dice, added check for room access

This commit is contained in:
Torsten Schulz
2017-07-22 22:24:38 +02:00
parent b5b4c94f65
commit 105232a9e3
7 changed files with 188 additions and 18 deletions

8
user.h
View File

@@ -19,7 +19,11 @@ namespace Yc {
userListe = 2,
roomList = 3,
message = 4,
system = 5
system = 5,
scream = 6,
dosomething = 7,
dice = 8,
result = 9
};
User(Room *parent, std::string name, std::string color, int socket);
@@ -28,6 +32,7 @@ namespace Yc {
bool validateToken(std::string token);
bool isUser(User *toValidate);
void sendMsg(MsgType type, std::string message, std::string userName, std::string color);
void sendMsg(MsgType type, const char *message, std::string userName, std::string color);
void sendMsg(MsgType type, Json::Value message, std::string userName, std::string color);
void checkerTask();
void stop();
@@ -43,6 +48,7 @@ namespace Yc {
void send(std::string out);
void send(Json::Value out);
void handleMessage(std::string message);
void doDice();
};
} // namespace Lib