mirror of
https://github.com/znc/znc.git
synced 2026-05-06 21:42:28 +02:00
Progress on modpython global hooks.
OnModuleLoading, OnModuleUnloading, OnGetModInfo work fine. Need to add: OnClientCapLs, OnGetAvailableMods, OnLoginAttempt See #98
This commit is contained in:
29
modules/modpython/ret.h
Normal file
29
modules/modpython/ret.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2012 See the AUTHORS file for details.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
class CPyRetString {
|
||||
public:
|
||||
CString& s;
|
||||
CPyRetString(CString& S) : s(S) {}
|
||||
static PyObject* wrap(CString& S) {
|
||||
CPyRetString* x = new CPyRetString(S);
|
||||
return SWIG_NewInstanceObj(x, SWIG_TypeQuery("CPyRetString*"), SWIG_POINTER_OWN);
|
||||
}
|
||||
};
|
||||
|
||||
class CPyRetBool {
|
||||
public:
|
||||
bool& b;
|
||||
CPyRetBool(bool& B) : b(B) {}
|
||||
static PyObject* wrap(bool& B) {
|
||||
CPyRetBool* x = new CPyRetBool(B);
|
||||
return SWIG_NewInstanceObj(x, SWIG_TypeQuery("CPyRetBool*"), SWIG_POINTER_OWN);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user