summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/protocols/protoaccs.cpp12
-rw-r--r--src/modules/protocols/protocols.cpp1
-rw-r--r--src/modules/protocols/protoopts.cpp6
3 files changed, 7 insertions, 12 deletions
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index c21e1a85c8..eef0ef61a4 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -46,7 +46,6 @@ static int EnumDbModules(const char *szModuleName, DWORD ofsModuleName, LPARAM l
if ( !Proto_GetAccount(szModuleName)) {
PROTOACCOUNT* pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
pa->cbSize = sizeof(*pa);
- pa->type = PROTOTYPE_PROTOCOL;
pa->szModuleName = mir_strdup(szModuleName);
pa->szProtoName = mir_strdup(dbv.pszVal);
pa->tszAccountName = mir_a2t(szModuleName);
@@ -78,7 +77,6 @@ void LoadDbAccounts(void)
continue;
}
pa->cbSize = sizeof(*pa);
- pa->type = PROTOTYPE_PROTOCOL;
pa->szModuleName = mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
@@ -271,14 +269,13 @@ int LoadAccountsModule(void)
continue;
if ( !Proto_IsAccountEnabled(pa)) {
- pa->type = PROTOTYPE_DISPROTO;
+ pa->bDynDisabled = TRUE;
continue;
}
- if ( !ActivateAccount(pa)) {
+ if ( !ActivateAccount(pa))
pa->bDynDisabled = TRUE;
- pa->type = PROTOTYPE_DISPROTO;
- } }
+ }
HookEvent(ME_SYSTEM_MODULESLOADED, InitializeStaticAccounts);
HookEvent(ME_SYSTEM_PRESHUTDOWN, UninitializeStaticAccounts);
@@ -430,7 +427,6 @@ BOOL ActivateAccount(PROTOACCOUNT* pa)
if (ppi == NULL)
return FALSE;
- pa->type = PROTOTYPE_PROTOCOL;
pa->ppro = ppi;
ppi->m_iDesiredStatus = ppi->m_iStatus = ID_STATUS_OFFLINE;
CreateProtoServiceEx(pa->szModuleName, PS_ADDTOLIST, (MIRANDASERVICEOBJ)stub1, pa->ppro);
@@ -539,7 +535,7 @@ void DeactivateAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase)
param->bIsDynamic = bIsDynamic;
param->bErase = bErase;
pa->ppro = NULL;
- pa->type = PROTOTYPE_DISPROTO;
+ pa->bDynDisabled = TRUE;
if (bIsDynamic)
mir_forkthread((pThreadFunc)DeactivationThread, param);
else
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp
index f2bada7aa0..4ecb0cb056 100644
--- a/src/modules/protocols/protocols.cpp
+++ b/src/modules/protocols/protocols.cpp
@@ -130,7 +130,6 @@ static INT_PTR Proto_RegisterModule(WPARAM, LPARAM lParam)
if (pa == NULL) {
pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
pa->cbSize = sizeof(PROTOACCOUNT);
- pa->type = PROTOTYPE_PROTOCOL;
pa->szModuleName = mir_strdup(pd->szName);
pa->szProtoName = mir_strdup(pd->szName);
pa->tszAccountName = mir_a2t(pd->szName);
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp
index c6c43f4169..d5734105f0 100644
--- a/src/modules/protocols/protoopts.cpp
+++ b/src/modules/protocols/protoopts.cpp
@@ -155,7 +155,6 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam
pa->bIsVisible = TRUE;
pa->iOrder = accounts.getCount();
- pa->type = PROTOTYPE_PROTOCOL;
break;
}
{
@@ -195,7 +194,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam
if ( !db_get_b(NULL, "CList", "MoveProtoMenus", TRUE))
pa->ppro->OnEvent(EV_PROTO_ONMENU, 0, 0);
}
- else pa->type = PROTOTYPE_DISPROTO;
+ else pa->bDynDisabled = TRUE;
}
WriteDbAccounts();
@@ -779,7 +778,8 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM
if ( !db_get_b(NULL, "CList", "MoveProtoMenus", TRUE))
pa->ppro->OnEvent(EV_PROTO_ONMENU, 0, 0);
}
- else pa->type = PROTOTYPE_DISPROTO; }
+ else pa->bDynDisabled = TRUE;
+ }
else {
DWORD dwStatus = CallProtoServiceInt(NULL,pa->szModuleName, PS_GETSTATUS, 0, 0);
if (dwStatus >= ID_STATUS_ONLINE) {