33 Commits

Author SHA1 Message Date
Falk Rund
ad6a397ca4 Welcome to 2026
[skip ci]
2026-01-01 13:44:32 +01:00
Alexey Sokolov
8c983564e8 Add test for modperl SCString functions.
Pass CClient to the OnClientGetSASLMechanisms callback.

See #1970
2025-07-31 23:47:26 +01:00
Alexey Sokolov
50f085cc2f Disable i18n test when i18n is disabled 2025-05-04 10:36:48 +01:00
Alexey Sokolov
5974d0ff3b Workaround for parallel writing of LLVM profiler data
Skip failing tests on cygwin: we'll just have to mark the unix socket feature as "experimental", but shouldn't block merging it due to cygwin being weird
2025-05-01 22:24:10 +01:00
Alexey Sokolov
5184d662d3 macos test probably should be fixed now 2025-04-28 22:08:13 +01:00
Alexey Sokolov
81e7fd69de WIP debugging failures on mac and cygwin... 2025-04-28 00:55:13 +01:00
Alexey Sokolov
951c39479f Update several tests to accept empty string or "localhost"
For unix sockets the behavior of getpeername() is different on different OS

This required to add support of regex to the integration test framework
2025-04-22 01:10:22 +01:00
Alexey Sokolov
b642d92ce7 Switch integration test to mostly use unix sockets
By not using the same hardcoded number for every test, we can parallelize the test now.

There are several cases remaining where we can't easily use unix sockets (e.g. QSslSocket or imapauth module), for that ask kernel what port number is currently free to use. This is a bit racy though.
2025-04-21 00:19:46 +01:00
Alexey Sokolov
d3a7f125cf Make unix sockets work from modules 2025-04-20 08:31:36 +01:00
Alexey Sokolov
a7dffb8ff1 Add modperl support for sasl 2025-03-16 00:42:27 +00:00
Alexey Sokolov
93e364b296 Add modpython sasl test 2025-03-15 22:43:35 +00:00
Peter
44e4b95a20 Welcome to 2025 (#1929) 2025-02-07 23:23:45 +00:00
Alexey Sokolov
f8552fc814 Skip modperl/modpython tests cleaner 2024-02-25 14:13:32 +00:00
Falk Rund
17a004aa0b Welcome to 2024
[skip ci]
2023-12-31 21:09:25 +01:00
Alexey Sokolov
aa5016657b Fix modpython to show list of available modules
In 1.8.0 I switched from deprecated imp to importlib for loading module
by name, but forgot about this function

Close #1884
2023-10-26 00:36:12 +01:00
KindOne
ee9ad2ff8e Use module names as the module ident.
Some clients will reuse query windows as the client thinks its just a
nick change if you have a existing query window with a module and a different one messages you.

Fix that by using the modules name as the ident.

Update tests to match new modules ident.
2023-09-08 07:21:31 -04:00
Falk Rund
f9fd05c307 Welcome to 2023 2023-01-01 06:49:00 +01:00
Alexey Sokolov
9c855b5c01 Test module translation of commands 2022-07-05 00:24:38 +01:00
Alexey Sokolov
e0c05ddb63 Rename cmd/desc to command/description
Ref #1832
2022-07-04 23:16:22 +01:00
Ernestas Kulik
94f1c32729 modules: modpython: Implement Module.AddCommand()
Currently, there is no usable wrapper for CModCommand for use within
bindings, so this commit adds a proxy class that adds itself as a
callback and allows implementing Python classes to implement commands
via __call__().

A completely synthetic example:

import znc

class foo(znc.Module):
    module_types = [znc.CModInfo.UserModule]

    def OnLoad(self, args, message):
        self.AddHelpCommand()
        self.AddCommand(FooCmd)

        return True

class FooCmd(znc.Command):
    cmd = 'foo'
    args = foo.t_d('bar')
    desc = foo.t_d('baz')

    def __call__(self, line):
        self.GetModule().PutModule('I have been foo’d!')

Fixes https://github.com/znc/znc/issues/198
2022-07-04 07:28:24 +03:00
Falk Rund
6402d241ac Welcome to 2022
The same procedure as last year, Miss Sophie?
Same procedure as every year, James.
2022-01-01 14:05:32 +01:00
MAGIC
99687b0f24 Welcome to 2021 2021-01-01 19:37:07 +01:00
Alexey Sokolov
47e633b267 Don't load modperl as a python module
Close #1757
2020-09-17 23:08:19 +01:00
Alexey Sokolov
b3b38956a7 Rewrite how modpython loads modules
'imp' was deprecated since python 3.3.
This removes the undocumented feature of loading python C extension as
ZNC module, but adds a test that python package can be loaded.

Bump python requirements to 3.4
2020-05-23 13:32:50 +01:00
Alexey Sokolov
f3d7922499 Update copyright in files which were missing in the previous update 2020-01-05 11:37:51 +00:00
Alexey Sokolov
8d309bbb3d Merge branch '1.7.x' 2019-03-30 16:17:59 +00:00
Alexey Sokolov
64613bc8b6 Don't crash if user specified invalid encoding.
This is CVE-2019-9917
2019-03-22 00:22:00 +00:00
Pierre Gordon
6af027c5dd Normalize methods with 'UserName' to 'Username' 2019-01-01 16:19:27 -05:00
Alexey Sokolov
4b92790562 Fix #1543 for modperl too
While at it, fix a memory leak in NV handling

Add some tests
2018-06-04 22:03:10 +01:00
Alexey Sokolov
c6a04023a4 Reformat test 2018-04-04 01:21:09 +01:00
Alexey Sokolov
d8327977ca Add socket test to modperl 2018-03-27 22:49:23 +01:00
Alexey Sokolov
6eaa93f8da Fix python sockets after latest changes.
The issue was triggered by CCoreTranslationMixin being parent of
CZNCSock, and DisableReadLine wasn't found as attribute anymore.

Thanks to obiw4n for report.
2018-03-27 22:26:05 +01:00
Alexey Sokolov
70dabc07dc Split integration test file to several files. 2018-02-13 21:25:17 +00:00