diff options
Diffstat (limited to 'plugins/StatusPlugins')
-rw-r--r-- | plugins/StatusPlugins/StartupStatus/options.cpp | 14 | ||||
-rw-r--r-- | plugins/StatusPlugins/commonstatus.cpp | 29 | ||||
-rw-r--r-- | plugins/StatusPlugins/commonstatus.h | 2 |
3 files changed, 18 insertions, 27 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index d6b30052f7..c6cecb3d17 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -39,16 +39,16 @@ static int ClearDatabase(char* filter); static TSettingsList* GetCurrentProtoSettings()
{
int count;
- PROTOACCOUNT** protos;
- ProtoEnumAccounts( &count, &protos );
+ PROTOACCOUNT **protos;
+ ProtoEnumAccounts(&count, &protos);
- TSettingsList* result = new TSettingsList( count, CompareSettings );
- if ( result == NULL )
+ TSettingsList *result = new TSettingsList(count, CompareSettings);
+ if (result == NULL)
return NULL;
- for ( int i=0; i < count; i++ )
- if ( IsSuitableProto( protos[i] ))
- result->insert( new TSSSetting( protos[i] ));
+ for (int i=0; i < count; i++)
+ if ( IsSuitableProto(protos[i]))
+ result->insert( new TSSSetting(protos[i]));
return result;
}
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp index d02986a275..9ca9e15e35 100644 --- a/plugins/StatusPlugins/commonstatus.cpp +++ b/plugins/StatusPlugins/commonstatus.cpp @@ -164,11 +164,11 @@ static int equalsGlobalStatus(PROTOCOLSETTINGEX **ps) { return 0;
int count;
- PROTOACCOUNT** protos;
- ProtoEnumAccounts( &count, &protos );
+ PROTOACCOUNT **protos;
+ ProtoEnumAccounts(&count, &protos);
- for ( i=0; i < count; i++ ) {
- if ( !IsSuitableProto( protos[i] ))
+ for (i=0; i < count; i++) {
+ if ( !IsSuitableProto(protos[i]))
continue;
pstatus = 0;
@@ -317,18 +317,9 @@ static INT_PTR GetProtocolCountService(WPARAM wParam, LPARAM lParam) return GetProtoCount();
}
-bool IsSuitableProto( PROTOACCOUNT* pa )
+bool IsSuitableProto(PROTOACCOUNT *pa)
{
- if ( pa == NULL )
- return false;
-
- if ( pa->bDynDisabled || !pa->bIsEnabled )
- return false;
-
- if ( CallProtoService( pa->szProtoName, PS_GETCAPS, PFLAGNUM_2, 0 ) == 0 )
- return false;
-
- return true;
+ return (pa == NULL) ? false : (pcli->pfnGetProtocolVisibility(pa->szModuleName) != 0);
}
int GetProtoCount()
@@ -336,12 +327,12 @@ int GetProtoCount() int pCount = 0;
int count;
- PROTOACCOUNT** protos;
+ PROTOACCOUNT **protos;
ProtoEnumAccounts( &count, &protos );
- for ( int i=0; i < count; i++ )
- if ( IsSuitableProto( protos[i] ))
- pCount ++;
+ for (int i=0; i < count; i++)
+ if ( IsSuitableProto(protos[i]))
+ pCount++;
return pCount;
}
diff --git a/plugins/StatusPlugins/commonstatus.h b/plugins/StatusPlugins/commonstatus.h index 8eccbc3a8f..64619f11bd 100644 --- a/plugins/StatusPlugins/commonstatus.h +++ b/plugins/StatusPlugins/commonstatus.h @@ -75,7 +75,7 @@ static int statusModePf2List[]={PF2_OFFLINE,PF2_ONLINE,PF2_SHORTAWAY,PF2_LONGAWA TCHAR *GetDefaultStatusMessage(PROTOCOLSETTINGEX *ps, int status);
int GetActualStatus(PROTOCOLSETTINGEX *protoSetting);
int InitCommonStatus();
-bool IsSuitableProto( PROTOACCOUNT* pa );
+bool IsSuitableProto(PROTOACCOUNT *pa);
/* SimpleAway */
|