diff options
author | George Hazan <george.hazan@gmail.com> | 2012-08-10 10:35:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-08-10 10:35:58 +0000 |
commit | 21549db08d22a6e41443799b917525da1dbf9853 (patch) | |
tree | d59e22f8b74510294b9e644719015461a4c5a003 /src/modules/plugins/newplugins.cpp | |
parent | 9bce64a32ea9d903797a27bb06b9919c11bbe596 (diff) |
- SRMM, Chat & Clist_Classic made standard
git-svn-id: http://svn.miranda-ng.org/main/trunk@1422 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/plugins/newplugins.cpp')
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index ad6206eaf4..684db5cb0c 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -40,26 +40,6 @@ LIST<pluginEntry> #define MAX_MIR_VER ULONG_MAX
-MuuidReplacement pluginDefault[] =
-{
- { MIID_UIUSERINFO, _T("stduserinfo"), NULL }, // 0
- { MIID_SRURL, _T("stdurl"), NULL }, // 1
- { MIID_SREMAIL, _T("stdemail"), NULL }, // 2
- { MIID_SRAUTH, _T("stdauth"), NULL }, // 3
- { MIID_SRFILE, _T("stdfile"), NULL }, // 4
- { MIID_UIHELP, _T("stdhelp"), NULL }, // 5
- { MIID_UIHISTORY, _T("stduihist"), NULL }, // 6
- { MIID_IDLE, _T("stdidle"), NULL }, // 7
- { MIID_AUTOAWAY, _T("stdautoaway"), NULL }, // 8
- { MIID_USERONLINE, _T("stduseronline"), NULL }, // 9
- { MIID_SRAWAY, _T("stdaway"), NULL }, // 10
-
- { MIID_CLIST, NULL, NULL }, // 11
- { MIID_CHAT, NULL, NULL }, // 12
- { MIID_SRMM, NULL, NULL }, // 13
- { MIID_DATABASE, NULL, NULL }, // 14
-};
-
static BOOL bModuleInitialized = FALSE;
TCHAR mirandabootini[MAX_PATH];
@@ -101,6 +81,27 @@ bool hasMuuid(const BASIC_PLUGIN_INFO& bpi, const MUUID& uuid) return false;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// default plugins
+
+static MuuidReplacement pluginDefault[] =
+{
+ { MIID_UIUSERINFO, _T("stduserinfo"), NULL }, // 0
+ { MIID_SRURL, _T("stdurl"), NULL }, // 1
+ { MIID_SREMAIL, _T("stdemail"), NULL }, // 2
+ { MIID_SRAUTH, _T("stdauth"), NULL }, // 3
+ { MIID_SRFILE, _T("stdfile"), NULL }, // 4
+ { MIID_UIHELP, _T("stdhelp"), NULL }, // 5
+ { MIID_UIHISTORY, _T("stduihist"), NULL }, // 6
+ { MIID_IDLE, _T("stdidle"), NULL }, // 7
+ { MIID_AUTOAWAY, _T("stdautoaway"), NULL }, // 8
+ { MIID_USERONLINE, _T("stduseronline"), NULL }, // 9
+ { MIID_SRAWAY, _T("stdaway"), NULL }, // 10
+ { MIID_CLIST, _T("stdclist"), NULL }, // 11
+ { MIID_CHAT, _T("stdchat"), NULL }, // 12
+ { MIID_SRMM, _T("stdmsg"), NULL } // 13
+};
+
int getDefaultPluginIdx(const MUUID& muuid)
{
for (int i=0; i < SIZEOF(pluginDefault); i++)
@@ -110,6 +111,18 @@ int getDefaultPluginIdx(const MUUID& muuid) return -1;
}
+int LoadStdPlugins()
+{
+ for (int i=0; i < SIZEOF(pluginDefault); i++) {
+ if ( pluginDefault[i].pImpl )
+ continue;
+
+ if ( !LoadCorePlugin(pluginDefault[i]))
+ return 1;
+ }
+ return 0;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// global functions
|