Progress on modpython global hooks.

OnModuleLoading, OnModuleUnloading, OnGetModInfo work fine.
Need to add: OnClientCapLs, OnGetAvailableMods, OnLoginAttempt

See #98
This commit is contained in:
Alexey Sokolov
2012-07-22 18:21:58 +07:00
parent 5b50003f33
commit 5656e14aa2
6 changed files with 62 additions and 6 deletions

View File

@@ -18,7 +18,7 @@
#include "modpython/swigpyrun.h"
#include "modpython/module.h"
#include "modpython/retstring.h"
#include "modpython/ret.h"
class CModPython: public CModule {
@@ -197,6 +197,11 @@ public:
Py_CLEAR(pyFunc);
return HALT;
}
if (!PyObject_IsTrue(pyRes)) {
// python module, but not handled by modpython itself.
// some module-loader written on python loaded it?
return CONTINUE;
}
Py_CLEAR(pyFunc);
Py_CLEAR(pyRes);
bSuccess = true;