How do I access "template<> void TModInfo" in a python module? #500

Closed
opened 2026-10-05 04:25:26 +02:00 by adam · 2 comments
Owner

Because I don't have template<> void TModInfo in a python module,
I can't link a python module to a wiki page.

Because I don't have `template<> void TModInfo` in a python module, I can't link a python module to a wiki page. <!-- github-sync-id:61101324 -->
adam closed this issue 2026-10-05 04:25:26 +02:00
Author
Owner

There is no direct access to that template. But all parameters available to C++ module via that template, are exposed to python and perl modules too.

class foo(znc.Module):
    wiki_page = '...'
package foo;
use base 'ZNC::Module';
sub wiki_page { '...' }

For full list you can look at other attributes of Module in znc.py (or in startup.pl).
If one of parameters is not available this way, then it was forgotten, and it's a bug.

There is no direct access to that template. But all parameters available to C++ module via that template, are exposed to python and perl modules too. ``` python class foo(znc.Module): wiki_page = '...' ``` ``` perl package foo; use base 'ZNC::Module'; sub wiki_page { '...' } ``` For full list you can look at other attributes of `Module` in `znc.py` (or in `startup.pl`). If one of parameters is not available this way, then it was forgotten, and it's a bug. <!-- github-comment-id:79306207 -->
Author
Owner

Thanks.
znc.Module has the full list of variables.

Thanks. znc.Module has the full list of variables. <!-- github-comment-id:79700938 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#500