Move the EModuleType into CModInfo

This also renames the values to shorter and more "well sounding" names.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2011-08-21 16:30:36 +02:00
parent 5f53c3509f
commit cce40e9f71
12 changed files with 76 additions and 76 deletions

View File

@@ -127,7 +127,7 @@ public:
}
virtual EModRet OnModuleLoading(const CString& sModName, const CString& sArgs,
EModuleType eType, bool& bSuccess, CString& sRetMsg) {
CModInfo::EModuleType eType, bool& bSuccess, CString& sRetMsg) {
PyObject* pyFunc = PyObject_GetAttrString(m_PyZNCModule, "load_module");
if (!pyFunc) {
sRetMsg = GetPyExceptionStr();
@@ -139,7 +139,7 @@ public:
sModName.c_str(),
sArgs.c_str(),
(int)eType,
(eType == ModuleTypeUser ? SWIG_NewInstanceObj(GetUser(), SWIG_TypeQuery("CUser*"), 0) : Py_None),
(eType == CModInfo::UserModule ? SWIG_NewInstanceObj(GetUser(), SWIG_TypeQuery("CUser*"), 0) : Py_None),
CPyRetString::wrap(sRetMsg),
SWIG_NewInstanceObj(reinterpret_cast<CModule*>(this), SWIG_TypeQuery("CModule*"), 0));
if (!pyRes) {
@@ -250,7 +250,7 @@ public:
return HALT;
}
void TryAddModInfo(const CString& sPath, const CString& sName, set<CModInfo>& ssMods, set<CString>& ssAlready, EModuleType eType) {
void TryAddModInfo(const CString& sPath, const CString& sName, set<CModInfo>& ssMods, set<CString>& ssAlready, CModInfo::EModuleType eType) {
if (ssAlready.count(sName)) {
return;
}
@@ -286,7 +286,7 @@ public:
}
}
virtual void OnGetAvailableMods(set<CModInfo>& ssMods, EModuleType eType) {
virtual void OnGetAvailableMods(set<CModInfo>& ssMods, CModInfo::EModuleType eType) {
CDir Dir;
CModules::ModDirList dirs = CModules::GetModDirs();