diff options
author | George Hazan <ghazan@miranda.im> | 2020-02-17 14:51:55 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-02-17 14:51:55 +0300 |
commit | d42f1c7fa5feb305e6f43722d7f36da86d885ed5 (patch) | |
tree | ed457b9c4f266fd2dbeb87f500474fe19f6db8da /protocols/JabberG/src | |
parent | 99e93a577704f4c59244ff053138bd483b80a709 (diff) |
Jabber: massive options code cleaning
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 57 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_opt.cpp | 5 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_opttree.cpp | 7 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_opttree.h | 8 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_proto.cpp | 71 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_proto.h | 111 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_vcard.cpp | 2 |
8 files changed, 96 insertions, 167 deletions
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index da7f2956ea..f045dc143f 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -39,7 +39,6 @@ static HANDLE hStatusMenuInit; static int hChooserMenu;
static int iChooserMenuPos = 30000;
-static HGENMENU g_hMenuRosterAdd;
static HGENMENU g_hMenuAddBookmark;
static HGENMENU g_hMenuLogin;
static HGENMENU g_hMenuRefresh;
@@ -71,12 +70,6 @@ static INT_PTR JabberMenuChooseService(WPARAM wParam, LPARAM lParam) return 0;
}
-static INT_PTR JabberMenuRosterAdd(WPARAM hContact, LPARAM lParam)
-{
- CJabberProto *ppro = CMPlugin::getInstance(hContact);
- return(ppro) ? ppro->OnMenuRosterAdd(hContact, lParam) : 0;
-}
-
static INT_PTR JabberMenuBookmarkAdd(WPARAM hContact, LPARAM lParam)
{
CJabberProto *ppro = CMPlugin::getInstance(hContact);
@@ -123,7 +116,6 @@ static int JabberPrebuildContactMenu(WPARAM hContact, LPARAM lParam) {
Menu_ShowItem(g_hMenuCommands, false);
Menu_ShowItem(g_hMenuSendNote, false);
- Menu_ShowItem(g_hMenuRosterAdd, false);
Menu_ShowItem(g_hMenuLogin, false);
Menu_ShowItem(g_hMenuRefresh, false);
Menu_ShowItem(g_hMenuAddBookmark, false);
@@ -157,15 +149,6 @@ void g_MenuInit(void) CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNMOVABLE;
- // "Add to roster"
- SET_UID(mi, 0x3928ba10, 0x69bc, 0x4ec9, 0x96, 0x48, 0xa4, 0x1b, 0xbe, 0x58, 0x4a, 0x7e);
- mi.pszService = "Jabber/AddToRoster";
- mi.name.a = LPGEN("Add to roster");
- mi.position = -1999901005;
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
- g_hMenuRosterAdd = Menu_AddContactMenuItem(&mi);
- CreateServiceFunction(mi.pszService, JabberMenuRosterAdd);
-
// "Add to Bookmarks"
SET_UID(mi, 0x7d06d00b, 0x3a3e, 0x4d65, 0xac, 0xc5, 0x63, 0xe2, 0x60, 0xbe, 0xc6, 0x6);
mi.pszService = "Jabber/AddToBookmarks";
@@ -269,7 +252,6 @@ void g_MenuUninit(void) {
DestroyHookableEvent(hStatusMenuInit);
- Menu_RemoveItem(g_hMenuRosterAdd);
Menu_RemoveItem(g_hMenuLogin);
Menu_RemoveItem(g_hMenuRefresh);
Menu_RemoveItem(g_hMenuAddBookmark);
@@ -297,13 +279,9 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) if (bIsChatRoom) {
ptrA roomid(getUStringA(hContact, "ChatRoomID"));
- if (roomid != nullptr) {
- Menu_ShowItem(g_hMenuRosterAdd, FALSE);
-
- if (ListGetItemPtr(LIST_BOOKMARK, roomid) == nullptr)
- if (m_ThreadInfo && m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE)
- Menu_ShowItem(g_hMenuAddBookmark, TRUE);
- }
+ if (ListGetItemPtr(LIST_BOOKMARK, roomid) == nullptr)
+ if (m_ThreadInfo && m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE)
+ Menu_ShowItem(g_hMenuAddBookmark, TRUE);
}
if (bIsChatRoom == GCW_CHATROOM)
@@ -382,35 +360,6 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM hContact, LPARAM)
-{
- if (!hContact)
- return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
-
- ptrA roomID(getUStringA(hContact, "ChatRoomID"));
- if (roomID == nullptr)
- return 0;
-
- if (ListGetItemPtr(LIST_ROSTER, roomID) == nullptr) {
- ptrA group(db_get_utfa(hContact, "CList", "Group"));
- ptrA nick(getUStringA(hContact, "Nick"));
-
- AddContactToRoster(roomID, nick, group);
- if (m_bAddRoster2Bookmarks == TRUE) {
- JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_BOOKMARK, roomID);
- if (item == nullptr) {
- item = new JABBER_LIST_ITEM();
- item->jid = mir_strdup(roomID);
- item->name = mir_wstrdup(Utf2T(nick));
- item->nick = getUStringA(hContact, "MyNick");
- AddEditBookmark(item);
- delete item;
- }
- }
- }
- return 0;
-}
-
INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM hContact, LPARAM)
{
if (hContact != 0 && m_bJabberOnline) {
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index d1c43da5f9..f3490a1c0c 100755 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -741,7 +741,7 @@ class CDlgOptAdvanced : public CJabberDlgBase CCtrlEdit m_txtDirect;
CCtrlTreeOpts m_otvOptions;
- BYTE m_oldFrameValue;
+ bool m_oldFrameValue;
public:
CDlgOptAdvanced(CJabberProto *proto) :
@@ -768,6 +768,7 @@ public: m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Enable user activity receiving"), m_proto->m_bEnableUserActivity);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Receive notes"), m_proto->m_bAcceptNotes);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Automatically save received notes"), m_proto->m_bAutosaveNotes);
+ m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Inline pictures in messages (XEO-0231)"), m_proto->m_bInlinePictures);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Enable server-side history (XEP-0136)"), m_proto->m_bEnableMsgArchive);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Receive conversations from other devices (XEP-0280)"), m_proto->m_bEnableCarbons);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Use Stream Management (XEP-0198) if possible (Testing)"), m_proto->m_bEnableStreamMgmt);
@@ -878,7 +879,7 @@ public: m_otvOptions.AddOption(LPGENW("General") L"/" LPGENW("Autoaccept multiuser chat invitations"), m_proto->m_bAutoAcceptMUC);
m_otvOptions.AddOption(LPGENW("General") L"/" LPGENW("Automatically join bookmarks on login"), m_proto->m_bAutoJoinBookmarks);
m_otvOptions.AddOption(LPGENW("General") L"/" LPGENW("Automatically join conferences on login"), m_proto->m_bAutoJoinConferences);
- m_otvOptions.AddOption(LPGENW("General") L"/" LPGENW("Do not open chat windows on creation"), m_proto->m_bAutoJoinHidden);
+ m_otvOptions.AddOption(LPGENW("General") L"/" LPGENW("Do not open chat windows on creation"), m_proto->m_bAutoJoinHidden);
m_otvOptions.AddOption(LPGENW("General") L"/" LPGENW("Do not show multiuser chat invitations"), m_proto->m_bIgnoreMUCInvites);
m_otvOptions.AddOption(LPGENW("Log events") L"/" LPGENW("Ban notifications"), m_proto->m_bGcLogBans);
m_otvOptions.AddOption(LPGENW("Log events") L"/" LPGENW("Room configuration changes"), m_proto->m_bGcLogConfig);
diff --git a/protocols/JabberG/src/jabber_opttree.cpp b/protocols/JabberG/src/jabber_opttree.cpp index 84bd684683..46f979bc7d 100644 --- a/protocols/JabberG/src/jabber_opttree.cpp +++ b/protocols/JabberG/src/jabber_opttree.cpp @@ -41,7 +41,7 @@ CCtrlTreeOpts::~CCtrlTreeOpts() delete it;
}
-void CCtrlTreeOpts::AddOption(wchar_t *szOption, CMOption<BYTE> &option)
+void CCtrlTreeOpts::AddOption(wchar_t *szOption, CMOption<bool> &option)
{
m_options.insert(new COptionsItem(szOption, option), m_options.getCount());
}
@@ -226,8 +226,9 @@ void CCtrlTreeOpts::ProcessItemClick(HTREEITEM hti) SetItem(&tvi);
}
-CCtrlTreeOpts::COptionsItem::COptionsItem(wchar_t *szOption, CMOption<BYTE> &option) :
-m_option(&option), m_groupId(OPTTREE_CHECK), m_hItem(nullptr)
+CCtrlTreeOpts::COptionsItem::COptionsItem(wchar_t *szOption, CMOption<bool> &option) :
+ m_option(&option),
+ m_groupId(OPTTREE_CHECK)
{
m_szOptionName = mir_wstrdup(szOption);
}
diff --git a/protocols/JabberG/src/jabber_opttree.h b/protocols/JabberG/src/jabber_opttree.h index b40d673eca..a1dab5d5f1 100644 --- a/protocols/JabberG/src/jabber_opttree.h +++ b/protocols/JabberG/src/jabber_opttree.h @@ -37,7 +37,7 @@ public: CCtrlTreeOpts(CDlgBase* dlg, int ctrlId);
~CCtrlTreeOpts();
- void AddOption(wchar_t *szOption, CMOption<BYTE> &option);
+ void AddOption(wchar_t *szOption, CMOption<bool> &option);
BOOL OnNotify(int idCtrl, NMHDR *pnmh) override;
void OnDestroy() override;
@@ -50,11 +50,11 @@ protected: wchar_t *m_szOptionName;
int m_groupId;
- CMOption<BYTE> *m_option;
+ CMOption<bool> *m_option;
- HTREEITEM m_hItem;
+ HTREEITEM m_hItem = nullptr;
- COptionsItem(wchar_t *szOption, CMOption<BYTE> &option);
+ COptionsItem(wchar_t *szOption, CMOption<bool> &option);
~COptionsItem();
};
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 9a3008cfa8..bb71ff5212 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -75,64 +75,63 @@ CJabberProto::CJabberProto(const char *aProtoName, const wchar_t *aUserName) : m_uEnabledFeatCapsDynamic(0),
m_StrmMgmt(this),
- m_bBsDirect(this, "BsDirect", true),
- m_bAllowVersionRequests(this, "m_bAllowVersionRequests", true),
m_bAcceptHttpAuth(this, "m_bAcceptHttpAuth", true),
- m_bAddRoster2Bookmarks(this, "m_bAddRoster2Bookmarks", true),
+ m_bAcceptNotes(this, "AcceptNotes", true),
+ m_bAllowVersionRequests(this, "m_bAllowVersionRequests", true),
m_bAutoAcceptAuthorization(this, "AutoAcceptAuthorization", false),
m_bAutoAcceptMUC(this, "AutoAcceptMUC", false),
m_bAutoAdd(this, "AutoAdd", true),
m_bAutoJoinBookmarks(this, "AutoJoinBookmarks", true),
- m_bAutoJoinConferences(this, "AutoJoinConferences", 0),
+ m_bAutoJoinConferences(this, "AutoJoinConferences", false),
m_bAutoJoinHidden(this, "AutoJoinHidden", true),
- m_bAvatarType(this, "AvatarType", PA_FORMAT_UNKNOWN),
+ m_bAutosaveNotes(this, "AutosaveNotes", false),
+ m_bBsDirect(this, "BsDirect", true),
m_bBsDirectManual(this, "BsDirectManual", false),
m_bBsOnlyIBB(this, "BsOnlyIBB", false),
m_bBsProxyManual(this, "BsProxyManual", false),
m_bDisable3920auth(this, "Disable3920auth", false),
m_bDisableFrame(this, "DisableFrame", true),
m_bEnableAvatars(this, "EnableAvatars", true),
- m_bEnableRemoteControl(this, "EnableRemoteControl", false),
+ m_bEnableCarbons(this, "EnableCarbons", true),
m_bEnableMsgArchive(this, "EnableMsgArchive", false),
+ m_bEnableRemoteControl(this, "EnableRemoteControl", false),
+ m_bEnableStreamMgmt(this, "UseStreamMgmt", false),
m_bEnableUserActivity(this, "EnableUserActivity", true),
m_bEnableUserMood(this, "EnableUserMood", true),
m_bEnableUserTune(this, "EnableUserTune", false),
m_bEnableZlib(this, "EnableZlib", true),
- m_bExtendedSearch(this, "ExtendedSearch", true),
m_bFixIncorrectTimestamps(this, "FixIncorrectTimestamps", true),
m_bGcLogAffiliations(this, "GcLogAffiliations", false),
m_bGcLogBans(this, "GcLogBans", true),
+ m_bGcLogChatHistory(this, "GcLogChatHistory", true),
m_bGcLogConfig(this, "GcLogConfig", false),
m_bGcLogRoles(this, "GcLogRoles", false),
m_bGcLogStatuses(this, "GcLogStatuses", false),
- m_bGcLogChatHistory(this, "GcLogChatHistory", true),
m_bHostNameAsResource(this, "HostNameAsResource", false),
m_bIgnoreMUCInvites(this, "IgnoreMUCInvites", false),
+ m_bIgnoreRosterGroups(this, "IgnoreRosterGroups", false),
+ m_bInlinePictures(this, "InlinePictures", true),
m_bKeepAlive(this, "KeepAlive", true),
m_bLogChatstates(this, "LogChatstates", false),
m_bLogPresence(this, "LogPresence", true),
m_bLogPresenceErrors(this, "LogPresenceErrors", false),
m_bManualConnect(this, "ManualConnect", false),
m_bMsgAck(this, "MsgAck", false),
+ m_bProcessXMPPLinks(this, "ProcessXMPPLinks", false),
+ m_bRcMarkMessagesAsRead(this, "RcMarkMessagesAsRead", true),
m_bRosterSync(this, "RosterSync", false),
m_bSavePassword(this, "SavePassword", true),
m_bShowForeignResourceInMirVer(this, "ShowForeignResourceInMirVer", false),
m_bShowOSVersion(this, "ShowOSVersion", true),
m_bShowTransport(this, "ShowTransport", true),
- m_bUseSSL(this, "UseSSL", false),
- m_bUseTLS(this, "UseTLS", true),
m_bUseDomainLogin(this, "UseDomainLogin", false),
- m_bAcceptNotes(this, "AcceptNotes", true),
- m_bAutosaveNotes(this, "AutosaveNotes", false),
- m_bRcMarkMessagesAsRead(this, "RcMarkMessagesAsRead", 1),
- m_iConnectionKeepAliveInterval(this, "ConnectionKeepAliveInterval", 60000),
- m_iConnectionKeepAliveTimeout(this, "ConnectionKeepAliveTimeout", 50000),
- m_bProcessXMPPLinks(this, "ProcessXMPPLinks", false),
- m_bIgnoreRosterGroups(this, "IgnoreRosterGroups", false),
- m_bEnableCarbons(this, "EnableCarbons", true),
m_bUseHttpUpload(this, "UseHttpUpload", false),
m_bUseOMEMO(this, "UseOMEMO", false),
- m_bEnableStreamMgmt(this, "UseStreamMgmt", false)
+ m_bUseSSL(this, "UseSSL", false),
+ m_bUseTLS(this, "UseTLS", true),
+
+ m_iConnectionKeepAliveInterval(this, "ConnectionKeepAliveInterval", 60000),
+ m_iConnectionKeepAliveTimeout(this, "ConnectionKeepAliveTimeout", 50000)
{
debugLogA("Setting protocol/module name to '%s'", m_szModuleName);
@@ -756,36 +755,22 @@ HANDLE CJabberProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, if (!m_bJabberOnline || szServerName == nullptr)
return nullptr;
- BOOL bIsExtFormat = m_bExtendedSearch;
-
- CJabberIqInfo *pInfo = AddIQ((bIsExtFormat) ? &CJabberProto::OnIqResultExtSearch : &CJabberProto::OnIqResultSetSearch, JABBER_IQ_TYPE_SET, szServerName);
+ CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultExtSearch, JABBER_IQ_TYPE_SET, szServerName);
XmlNodeIq iq(pInfo);
TiXmlElement *query = iq << XQUERY(JABBER_FEAT_JUD);
- if (bIsExtFormat) {
- if (m_tszSelectedLang)
- iq << XATTR("xml:lang", m_tszSelectedLang);
+ if (m_tszSelectedLang)
+ iq << XATTR("xml:lang", m_tszSelectedLang);
- TiXmlElement *x = query << XCHILDNS("x", JABBER_FEAT_DATA_FORMS) << XATTR("type", "submit");
- if (nick[0] != '\0')
- x << XCHILD("field") << XATTR("var", "user") << XATTR("value", T2Utf(nick));
+ TiXmlElement *x = query << XCHILDNS("x", JABBER_FEAT_DATA_FORMS) << XATTR("type", "submit");
+ if (nick[0] != '\0')
+ x << XCHILD("field") << XATTR("var", "user") << XATTR("value", T2Utf(nick));
- if (firstName[0] != '\0')
- x << XCHILD("field") << XATTR("var", "fn") << XATTR("value", T2Utf(firstName));
+ if (firstName[0] != '\0')
+ x << XCHILD("field") << XATTR("var", "fn") << XATTR("value", T2Utf(firstName));
- if (lastName[0] != '\0')
- x << XCHILD("field") << XATTR("var", "given") << XATTR("value", T2Utf(lastName));
- }
- else {
- if (nick[0] != '\0')
- query << XCHILD("nick", T2Utf(nick));
-
- if (firstName[0] != '\0')
- query << XCHILD("first", T2Utf(firstName));
-
- if (lastName[0] != '\0')
- query << XCHILD("last", T2Utf(lastName));
- }
+ if (lastName[0] != '\0')
+ x << XCHILD("field") << XATTR("var", "given") << XATTR("value", T2Utf(lastName));
m_ThreadInfo->send(iq);
return (HANDLE)pInfo->GetIqId();
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 5ae2686229..bb18313b0f 100755 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -170,62 +170,60 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface ThreadData* m_ThreadInfo;
- CMOption<BYTE> m_bAllowVersionRequests;
- CMOption<BYTE> m_bAcceptHttpAuth;
- CMOption<BYTE> m_bAddRoster2Bookmarks;
- CMOption<BYTE> m_bAutoAcceptAuthorization;
- CMOption<BYTE> m_bAutoAcceptMUC;
- CMOption<BYTE> m_bAutoAdd;
- CMOption<BYTE> m_bAutoJoinBookmarks;
- CMOption<BYTE> m_bAutoJoinConferences;
- CMOption<BYTE> m_bAutoJoinHidden;
- CMOption<BYTE> m_bAvatarType;
- CMOption<BYTE> m_bBsDirect;
- CMOption<BYTE> m_bBsDirectManual;
- CMOption<BYTE> m_bBsOnlyIBB;
- CMOption<BYTE> m_bBsProxyManual;
- CMOption<BYTE> m_bDisable3920auth;
- CMOption<BYTE> m_bDisableFrame;
- CMOption<BYTE> m_bEnableAvatars;
- CMOption<BYTE> m_bEnableRemoteControl;
- CMOption<BYTE> m_bEnableUserActivity;
- CMOption<BYTE> m_bEnableUserMood;
- CMOption<BYTE> m_bEnableUserTune;
- CMOption<BYTE> m_bEnableZlib;
- CMOption<BYTE> m_bExtendedSearch;
- CMOption<BYTE> m_bFixIncorrectTimestamps;
- CMOption<BYTE> m_bGcLogAffiliations;
- CMOption<BYTE> m_bGcLogBans;
- CMOption<BYTE> m_bGcLogConfig;
- CMOption<BYTE> m_bGcLogRoles;
- CMOption<BYTE> m_bGcLogStatuses;
- CMOption<BYTE> m_bGcLogChatHistory;
- CMOption<BYTE> m_bHostNameAsResource;
- CMOption<BYTE> m_bIgnoreMUCInvites;
- CMOption<BYTE> m_bKeepAlive;
- CMOption<BYTE> m_bLogChatstates;
- CMOption<BYTE> m_bLogPresence;
- CMOption<BYTE> m_bLogPresenceErrors;
- CMOption<BYTE> m_bManualConnect;
- CMOption<BYTE> m_bMsgAck;
- CMOption<BYTE> m_bRosterSync;
- CMOption<BYTE> m_bSavePassword;
- CMOption<BYTE> m_bUseDomainLogin;
- CMOption<BYTE> m_bShowForeignResourceInMirVer;
- CMOption<BYTE> m_bShowOSVersion;
- CMOption<BYTE> m_bShowTransport;
- CMOption<BYTE> m_bUseSSL;
- CMOption<BYTE> m_bUseTLS;
- CMOption<BYTE> m_bAcceptNotes;
- CMOption<BYTE> m_bAutosaveNotes;
- CMOption<BYTE> m_bEnableMsgArchive;
- CMOption<BYTE> m_bRcMarkMessagesAsRead;
- CMOption<BYTE> m_bProcessXMPPLinks;
- CMOption<BYTE> m_bIgnoreRosterGroups;
- CMOption<BYTE> m_bEnableCarbons;
- CMOption<BYTE> m_bUseHttpUpload;
- CMOption<BYTE> m_bUseOMEMO;
- CMOption<BYTE> m_bEnableStreamMgmt;
+ CMOption<bool> m_bAcceptHttpAuth;
+ CMOption<bool> m_bAcceptNotes;
+ CMOption<bool> m_bAllowVersionRequests;
+ CMOption<bool> m_bAutoAcceptAuthorization;
+ CMOption<bool> m_bAutoAcceptMUC;
+ CMOption<bool> m_bAutoAdd;
+ CMOption<bool> m_bAutoJoinBookmarks;
+ CMOption<bool> m_bAutoJoinConferences;
+ CMOption<bool> m_bAutoJoinHidden;
+ CMOption<bool> m_bAutosaveNotes;
+ CMOption<bool> m_bBsDirect;
+ CMOption<bool> m_bBsDirectManual;
+ CMOption<bool> m_bBsOnlyIBB;
+ CMOption<bool> m_bBsProxyManual;
+ CMOption<bool> m_bDisable3920auth;
+ CMOption<bool> m_bDisableFrame;
+ CMOption<bool> m_bEnableAvatars;
+ CMOption<bool> m_bEnableCarbons;
+ CMOption<bool> m_bEnableMsgArchive;
+ CMOption<bool> m_bEnableRemoteControl;
+ CMOption<bool> m_bEnableStreamMgmt;
+ CMOption<bool> m_bEnableUserActivity;
+ CMOption<bool> m_bEnableUserMood;
+ CMOption<bool> m_bEnableUserTune;
+ CMOption<bool> m_bEnableZlib;
+ CMOption<bool> m_bFixIncorrectTimestamps;
+ CMOption<bool> m_bGcLogAffiliations;
+ CMOption<bool> m_bGcLogBans;
+ CMOption<bool> m_bGcLogChatHistory;
+ CMOption<bool> m_bGcLogConfig;
+ CMOption<bool> m_bGcLogRoles;
+ CMOption<bool> m_bGcLogStatuses;
+ CMOption<bool> m_bHostNameAsResource;
+ CMOption<bool> m_bIgnoreMUCInvites;
+ CMOption<bool> m_bIgnoreRosterGroups;
+ CMOption<bool> m_bInlinePictures;
+ CMOption<bool> m_bKeepAlive;
+ CMOption<bool> m_bLogChatstates;
+ CMOption<bool> m_bLogPresence;
+ CMOption<bool> m_bLogPresenceErrors;
+ CMOption<bool> m_bManualConnect;
+ CMOption<bool> m_bMsgAck;
+ CMOption<bool> m_bProcessXMPPLinks;
+ CMOption<bool> m_bRcMarkMessagesAsRead;
+ CMOption<bool> m_bRosterSync;
+ CMOption<bool> m_bSavePassword;
+ CMOption<bool> m_bShowForeignResourceInMirVer;
+ CMOption<bool> m_bShowOSVersion;
+ CMOption<bool> m_bShowTransport;
+ CMOption<bool> m_bUseDomainLogin;
+ CMOption<bool> m_bUseHttpUpload;
+ CMOption<bool> m_bUseOMEMO;
+ CMOption<bool> m_bUseSSL;
+ CMOption<bool> m_bUseTLS;
CMOption<DWORD> m_iConnectionKeepAliveInterval;
CMOption<DWORD> m_iConnectionKeepAliveTimeout;
@@ -646,7 +644,6 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface //---- jabber_menu.cpp ---------------------------------------------------------------
- INT_PTR __cdecl OnMenuRosterAdd(WPARAM wParam, LPARAM lParam);
INT_PTR __cdecl OnMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam);
INT_PTR __cdecl OnMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam);
INT_PTR __cdecl OnMenuOptions(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 8f7bd27e00..739c9c35a1 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -269,8 +269,6 @@ INT_PTR __cdecl CJabberProto::JabberSetAvatar(WPARAM, LPARAM lParam) char buf[MIR_SHA1_HASH_SIZE * 2 + 1];
bin2hex(digest, sizeof(digest), buf);
- m_bAvatarType = ProtoGetBufferFormat(pResult);
-
GetAvatarFileName(0, tFileName, MAX_PATH);
FILE *out = _wfopen(tFileName, L"wb");
if (out != nullptr) {
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index 869c7530fa..0a0319f9da 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -1153,8 +1153,6 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, wchar_t *szPhotoFileName) char buf[MIR_SHA1_HASH_SIZE * 2 + 1];
bin2hex(digest, sizeof(digest), buf);
- m_bAvatarType = ProtoGetBufferFormat(buffer);
-
if (bPhotoChanged) {
DeleteFile(szAvatarName);
|