summaryrefslogtreecommitdiff
path: root/src/resources/chatobject.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-05 20:22:00 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-05 20:22:00 +0300
commitbd44e8d0a94dd96e6f8eb0828b4f2b5de902ee83 (patch)
tree28bfbcce0f7f34db5a42c7a27dfdac3a75b80e14 /src/resources/chatobject.h
parent84b6217136c8d59347ab9f28ec5e9e4d718d5058 (diff)
downloadplus-bd44e8d0a94dd96e6f8eb0828b4f2b5de902ee83.tar.gz
plus-bd44e8d0a94dd96e6f8eb0828b4f2b5de902ee83.tar.bz2
plus-bd44e8d0a94dd96e6f8eb0828b4f2b5de902ee83.tar.xz
plus-bd44e8d0a94dd96e6f8eb0828b4f2b5de902ee83.zip
add chat command for join chat room.
New chat command: /joinroom NAME
Diffstat (limited to 'src/resources/chatobject.h')
-rw-r--r--src/resources/chatobject.h21
1 files changed, 12 insertions, 9 deletions
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<std::string, ChatObject*> chatNameMap;
+ static std::map<int, ChatObject*> chatIdMap;
};
#endif // RESOURCES_CHATOBJECT_H