summaryrefslogtreecommitdiff
path: root/src/modules/clist/clistmenus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/clist/clistmenus.cpp')
-rw-r--r--src/modules/clist/clistmenus.cpp13
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;