Added dice, added check for room access
This commit is contained in:
8
user.h
8
user.h
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user