summaryrefslogtreecommitdiff
path: root/protocols/Facebook/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-12-24 20:49:41 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-12-24 20:49:41 +0300
commit8adeaba742faf26339786d0a92e7f295911cd30b (patch)
treedd04239f51dc5f1a91853a70c50ac0d3bcdf24bf /protocols/Facebook/src/proto.cpp
parent15357b4ba28cdc9085896da1855c428e1eb7c5e8 (diff)
Facebook: default group added to options
Diffstat (limited to 'protocols/Facebook/src/proto.cpp')
-rw-r--r--protocols/Facebook/src/proto.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp
index 31b99b2100..66e35e4744 100644
--- a/protocols/Facebook/src/proto.cpp
+++ b/protocols/Facebook/src/proto.cpp
@@ -30,7 +30,8 @@ static int CompareUsers(const FacebookUser *p1, const FacebookUser *p2)
FacebookProto::FacebookProto(const char *proto_name, const wchar_t *username) :
PROTO<FacebookProto>(proto_name, username),
- m_users(50, CompareUsers)
+ m_users(50, CompareUsers),
+ m_wszDefaultGroup(this, "DefaultGroup", L"Facebook")
{
for (auto &cc : AccContacts()) {
CMStringA szId(getMStringA(cc, DBKEY_ID));
@@ -82,7 +83,14 @@ FacebookProto::FacebookProto(const char *proto_name, const wchar_t *username) :
nlu.szDescriptiveName.w = descr;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
+ // Services
CreateProtoService(PS_CREATEACCMGRUI, &FacebookProto::SvcCreateAccMgrUI);
+
+ // Events
+ HookProtoEvent(ME_OPT_INITIALISE, &FacebookProto::OnOptionsInit);
+
+ // Default group
+ Clist_GroupCreate(0, m_wszDefaultGroup);
}
FacebookProto::~FacebookProto()