From bd44e8d0a94dd96e6f8eb0828b4f2b5de902ee83 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 Apr 2015 20:22:00 +0300 Subject: add chat command for join chat room. New chat command: /joinroom NAME --- src/resources/chatobject.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/resources/chatobject.h') diff --git a/src/resources/chatobject.h b/src/resources/chatobject.h index b3945ec5f..431718e41 100644 --- a/src/resources/chatobject.h +++ b/src/resources/chatobject.h @@ -25,24 +25,27 @@ struct ChatObject final { - ChatObject() : - ownerId(0), - chatId(0), - maxUsers(0), - currentUsers(0), - type(0), - title() - { - } + ChatObject(); + + ~ChatObject(); A_DELETE_COPY(ChatObject) + void update(); + + static ChatObject *findByName(const std::string &name); + + static ChatObject *findById(const int id); + int ownerId; int chatId; uint16_t maxUsers; uint16_t currentUsers; uint8_t type; std::string title; + + static std::map chatNameMap; + static std::map chatIdMap; }; #endif // RESOURCES_CHATOBJECT_H -- cgit v1.2.3-70-g09d2