mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Teach modperl and modpython about CMessage and new hooks which accept it.
Fix #1084 Fix #1085
This commit is contained in:
@@ -106,6 +106,9 @@ class MCString : public std::map<CString, CString> {};
|
||||
%template(VVString) std::vector<VCString>;
|
||||
%template(VClients) std::vector<CClient*>;
|
||||
|
||||
#define REGISTER_ZNC_MESSAGE(M) \
|
||||
%template(As_ ## M) CMessage::As<M>;
|
||||
|
||||
%typemap(in) CString& {
|
||||
String* p;
|
||||
int res = SWIG_IsOK(SWIG_ConvertPtr($input, (void**)&p, SWIG_TypeQuery("String*"), 0));
|
||||
@@ -153,6 +156,7 @@ class MCString : public std::map<CString, CString> {};
|
||||
%template(ZNCSocketManager) TSocketManager<CZNCSock>;
|
||||
%include "../include/znc/Socket.h"
|
||||
%include "../include/znc/FileUtils.h"
|
||||
%include "../include/znc/Message.h"
|
||||
%include "../include/znc/Modules.h"
|
||||
%include "../include/znc/Nick.h"
|
||||
%include "../include/znc/Chan.h"
|
||||
@@ -291,6 +295,15 @@ class CPyRetBool {
|
||||
}
|
||||
};
|
||||
|
||||
%extend CMessage {
|
||||
CString __str__() {
|
||||
return $self->ToString();
|
||||
}
|
||||
CString __repr__() {
|
||||
return $self->ToString();
|
||||
}
|
||||
};
|
||||
|
||||
%extend CZNC {
|
||||
PyObject* GetUserMap_() {
|
||||
PyObject* result = PyDict_New();
|
||||
|
||||
Reference in New Issue
Block a user