When using python based plugins that hook on the new-er *Message hoons (eg OnUserRawMessage), the GetParams() method on the CMessage given to the callback returns a tuple containing Swig Object of type 'unknown'.
ZNC version tested on: ZNC 1.7.0 (IPv6: yes, SSL: yes, DNS: threads, charset: yes, i18n: no, build: autoconf)
ZNC was built from source on my Ubuntu 18.04 desktop using python 3.6.5
When using python based plugins that hook on the new-er *Message hoons (eg OnUserRawMessage), the `GetParams()` method on the CMessage given to the callback returns a tuple containing `Swig Object of type 'unknown'`.
ZNC version tested on: ZNC 1.7.0 (IPv6: yes, SSL: yes, DNS: threads, charset: yes, i18n: no, build: autoconf)
ZNC was built from source on my Ubuntu 18.04 desktop using python 3.6.5
<!-- github-sync-id:328293219 -->
I was asked in #znc on freenode to add some further information:
importzncclasstest(znc.Module):description="example case for bug report"module_types=[znc.CModInfo.NetworkModule]defOnUserRawMessage(self,msg):self.PutModule(str(msg.GetParams()))
above is a working test case for this bug, it will PM a response from *test on any raw message passed through znc, the PM will contain something like: (<Swig Object of type 'unknown' at 0x7f0f051c0540>, <Swig Object of type 'unknown' at 0x7f0f051c00c0>)
Also not noted in my bug report is the fact that there are swig warnings in the debug log when this occurs:
[2018-06-01 22:23:13.463902] (ad/snoodev) CLI -> ZNC [znc loadmod test]
[2018-06-01 22:23:13.465286] (ad/snoodev) ZNC -> CLI [:*status!znc@znc.in PRIVMSG ad :Loaded module test: [./modules/test.py]]
[2018-06-01 22:23:16.835922] (ad/snoodev) CLI -> ZNC [PRIVMSG *status :dasdasd]
swig/python detected a memory leak of type 'unknown', no destructor found.
swig/python detected a memory leak of type 'unknown', no destructor found.
[2018-06-01 22:23:16.836251] (ad/snoodev) ZNC -> CLI [:*test!znc@znc.in PRIVMSG ad :(<Swig Object of type 'unknown' at 0x7f0f051c0540>, <Swig Object of type 'unknown' at 0x7f0f051c00c0>)]
I was asked in #znc on freenode to add some further information:
```python3
import znc
class test(znc.Module):
description = "example case for bug report"
module_types = [znc.CModInfo.NetworkModule]
def OnUserRawMessage(self, msg):
self.PutModule(str(msg.GetParams()))
```
above is a working test case for this bug, it will PM a response from `*test` on any raw message passed through znc, the PM will contain something like: `(<Swig Object of type 'unknown' at 0x7f0f051c0540>, <Swig Object of type 'unknown' at 0x7f0f051c00c0>)`
Also not noted in my bug report is the fact that there are swig warnings in the debug log when this occurs:
```
[2018-06-01 22:23:13.463902] (ad/snoodev) CLI -> ZNC [znc loadmod test]
[2018-06-01 22:23:13.465286] (ad/snoodev) ZNC -> CLI [:*status!znc@znc.in PRIVMSG ad :Loaded module test: [./modules/test.py]]
[2018-06-01 22:23:16.835922] (ad/snoodev) CLI -> ZNC [PRIVMSG *status :dasdasd]
swig/python detected a memory leak of type 'unknown', no destructor found.
swig/python detected a memory leak of type 'unknown', no destructor found.
[2018-06-01 22:23:16.836251] (ad/snoodev) ZNC -> CLI [:*test!znc@znc.in PRIVMSG ad :(<Swig Object of type 'unknown' at 0x7f0f051c0540>, <Swig Object of type 'unknown' at 0x7f0f051c00c0>)]
```
<!-- github-comment-id:393999703 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When using python based plugins that hook on the new-er *Message hoons (eg OnUserRawMessage), the
GetParams()method on the CMessage given to the callback returns a tuple containingSwig Object of type 'unknown'.ZNC version tested on: ZNC 1.7.0 (IPv6: yes, SSL: yes, DNS: threads, charset: yes, i18n: no, build: autoconf)
ZNC was built from source on my Ubuntu 18.04 desktop using python 3.6.5
I was asked in #znc on freenode to add some further information:
above is a working test case for this bug, it will PM a response from
*teston any raw message passed through znc, the PM will contain something like:(<Swig Object of type 'unknown' at 0x7f0f051c0540>, <Swig Object of type 'unknown' at 0x7f0f051c00c0>)Also not noted in my bug report is the fact that there are swig warnings in the debug log when this occurs:
Fixed in
11fb428878