summaryrefslogtreecommitdiff
path: root/dbeditorpp/knownmodules.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbeditorpp/knownmodules.c')
-rw-r--r--dbeditorpp/knownmodules.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/dbeditorpp/knownmodules.c b/dbeditorpp/knownmodules.c
deleted file mode 100644
index ecf95b3..0000000
--- a/dbeditorpp/knownmodules.c
+++ /dev/null
@@ -1,82 +0,0 @@
-#include "headers.h"
-
-#define MAXMODS 1024
-char *KnownModules[MAXMODS];
-int KnownModulesCount = 0;
-
-int RegisterModule(WPARAM wParam, LPARAM lParam)
-{
- char **mods = (char**)wParam;
- int count = lParam;
- int i;
- for (i=0;i<count && KnownModulesCount<MAXMODS;i++)
- KnownModules[KnownModulesCount++] = strdup(mods[i]);
- return 0;
-}
-
-int RegisterSingleModule(WPARAM wParam, LPARAM lParam)
-{
- char *mods = (char*)wParam;
- if (KnownModulesCount<MAXMODS)
- KnownModules[KnownModulesCount++] = strdup(mods);
- return 0;
-}
-
-int IsModuleKnown(char *module)
-{
- int i;
-
- if (!UseKnownModList) return 1; // not using known list so all are "known"
-
- for(i=0;i<KnownModulesCount;i++)
- {
- if (KnownModules[i] && !mir_strcmp(module,KnownModules[i]))
- return 1;
- }
-
- return 0;
-}
-
-void FreeKnownModuleList()
-{
- int i;
- for(i=0;i<KnownModulesCount;i++)
- {
- safe_free(KnownModules[i]);
- }
-}
-
-void doOldKnownModulesList()
-{
- ModuleSettingLL msll;
- struct ModSetLinkLinkItem *setting;
- DBVARIANT dbv;
- char *var, *temp;
-
- if (!EnumSettings(NULL,"KnownModules", &msll)) return;
-
- setting = msll.first;
- while(setting)
- {
- if (!DBGetContactSetting(NULL,"KnownModules",setting->name,&dbv) && dbv.type == DBVT_ASCIIZ)
- {
- temp = (char*)malloc(strlen(dbv.pszVal)+5);
- if (!temp) break;
- strcpy(temp,dbv.pszVal);
- strcat(temp,",\0");
- var = strtok(temp,", ");
- while (var)
- {
- if (KnownModulesCount<MAXMODS)
- KnownModules[KnownModulesCount++] = strdup(var);
- var = strtok(NULL,", ");
- }
- safe_free(temp);
- }
- DBFreeVariant(&dbv);
- setting = (struct ModSetLinkLinkItem *)setting->next;
- }
- FreeModuleSettingLL(&msll);
-
- UseKnownModList = DBGetContactSettingByte(NULL,modname,"UseKnownModList",1);
-}