summaryrefslogtreecommitdiff
path: root/src/resources/chatobject.h
diff options
context:
space:
mode:
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