diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-26 22:28:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-26 22:28:47 +0000 |
commit | 7f47efb0c5973054e00fac918d2e1cdd187dd35a (patch) | |
tree | fa7adcd9166e58cd2ae2a15a2e744a5ea6b1b0b5 /src/modules/clist/clistmenus.cpp | |
parent | c8ae2a45d384650fb562b078a06f024dc85caae8 (diff) |
virtual protos, invisible in the Account Manager & status bar, but fortunately searchable
git-svn-id: http://svn.miranda-ng.org/main/trunk@2515 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist/clistmenus.cpp')
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 01db784728..2ef22dbd70 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -795,12 +795,17 @@ static INT_PTR SetStatusMode(WPARAM wParam, LPARAM) return 0;
}
-int fnGetProtocolVisibility(const char* accName)
+int fnGetProtocolVisibility(const char *accName)
{
if (accName) {
- PROTOACCOUNT* pa = Proto_GetAccount(accName);
- return pa && pa->bIsVisible && Proto_IsAccountEnabled(pa) &&
- pa->ppro && (pa->ppro->GetCaps(PFLAGNUM_2, 0) & ~pa->ppro->GetCaps(PFLAGNUM_5, 0));
+ PROTOACCOUNT *pa = Proto_GetAccount(accName);
+ if (pa && pa->bIsVisible && Proto_IsAccountEnabled(pa) && pa->ppro) {
+ PROTOCOLDESCRIPTOR *pd = Proto_IsProtocolLoaded(pa->szProtoName);
+ if (pd == NULL || pd->type != PROTOTYPE_PROTOCOL)
+ return FALSE;
+
+ return (pa->ppro->GetCaps(PFLAGNUM_2, 0) & ~pa->ppro->GetCaps(PFLAGNUM_5, 0));
+ }
}
return FALSE;
|