mirror of
https://github.com/znc/znc.git
synced 2026-05-01 19:12:31 +02:00
Support OnClientCapLs in modpython #98
This commit is contained in:
@@ -261,7 +261,7 @@ while (<$in>) {
|
||||
when (/vector\s*<\s*.*\*\s*>/) {
|
||||
say $out "PyList_New(0);";
|
||||
}
|
||||
when (/CString/) {
|
||||
when (/(?:^|\s)CString/) { # not SCString
|
||||
if ($a->{base} eq 'CString' && $a->{mod} eq '&') {
|
||||
say $out "CPyRetString::wrap($a->{var});";
|
||||
} else {
|
||||
|
||||
@@ -72,3 +72,4 @@ EModRet OnModuleLoading(const CString& sModName, const CString& sArgs, CModInfo:
|
||||
EModRet OnModuleUnloading(CModule* pModule, bool& bSuccess, CString& sRetMsg)
|
||||
EModRet OnGetModInfo(CModInfo& ModInfo, const CString& sModule, bool& bSuccess, CString& sRetMsg)
|
||||
void OnGetAvailableMods(std::set<CModInfo>& ssMods, CModInfo::EModuleType eType)
|
||||
void OnClientCapLs(CClient* pClient, SCString& ssCaps)
|
||||
|
||||
@@ -65,6 +65,8 @@ using std::allocator;
|
||||
%template(VChannels) std::vector<CChan*>;
|
||||
%template(MNicks) std::map<CString, CNick>;
|
||||
%template(SModInfo) std::set<CModInfo>;
|
||||
%template(SCString) std::set<CString>;
|
||||
typedef std::set<CString> SCString;
|
||||
|
||||
%typemap(in) CString& {
|
||||
String* p;
|
||||
|
||||
@@ -123,6 +123,7 @@ public:
|
||||
virtual EModRet OnGetModInfo(CModInfo& ModInfo, const CString& sModule,
|
||||
bool& bSuccess, CString& sRetMsg);
|
||||
virtual void OnGetAvailableMods(std::set<CModInfo>& ssMods, CModInfo::EModuleType eType);
|
||||
virtual void OnClientCapLs(CClient* pClient, SCString& ssCaps);
|
||||
};
|
||||
|
||||
static inline CPyModule* AsPyModule(CModule* p) {
|
||||
|
||||
Reference in New Issue
Block a user