Commit Graph

235 Commits

Author SHA1 Message Date
Alexey Sokolov d532dcbd5c cygwin qt doesn't know qsizetype yet 2023-01-09 01:47:03 +00:00
Alexey Sokolov c15fc63c55 Implement cap negotiation 3.2 on server side
Used for "server-dependent" caps which already rely on sending NEW and
DEL to client. This functionality is not yet available for caps added by
modules.
2023-01-09 01:08:04 +00:00
Alexey Sokolov d49168b93f Make it possible for modules to send values in CAP LS 2023-01-08 15:46:21 +00:00
Alexey Sokolov b57d794aaf Send multiline CAP LS response for IRCv3.2 clients 2023-01-08 15:32:27 +00:00
Alexey Sokolov 4fc9429d0f Add test for different timezones 2023-01-07 23:36:56 +00:00
Alexey Sokolov 963a00a371 Merge commit 'refs/pull/1853/head' of github.com:znc/znc 2023-01-07 20:41:48 +00:00
Falk Rund f9fd05c307 Welcome to 2023 2023-01-01 06:49:00 +01:00
John Marrett 2a6a1d70ff Add ParseServerTime TZ fix and tests 2022-12-29 07:53:39 -05:00
Christian Heusel 876b3d4151 split up the option into two separate ones 2022-11-17 18:30:16 +01:00
Christian Heusel 1e90b8a185 re-add the ip to the user message 2022-11-17 18:11:36 +01:00
Christian Heusel bcf6e2fba6 add test for the "clientnotify" module 2022-11-07 23:19:17 +01:00
Christian Heusel 8562f61304 allow identifiers in the test setup 2022-11-07 23:19:16 +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
Chris Tyrrel c87192fb05 Add test for watch with spaces 2022-01-23 10:52:01 -07: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
Alexey Sokolov 6f28db4a5e Don't crash when receiving SASL lines from server without having negotiated SASL via CAP
Reported by Noisytoot on Pissnet, thanks
2021-11-28 16:27:44 +00:00
Bradley Shaw 8a9423d34b Add tests for deny options 2021-07-03 19:59:58 +01:00
Alexey Sokolov 688645413c Fix integration test after switch to libera 2021-06-18 21:20:53 +01:00
Alexey Sokolov e7b6a771c6 Hide password in PASS debug lines without : in trailing param 2021-06-01 21:58:07 +01:00
Alexey Sokolov fd71a69fab Rewrite message parsing using string_view
It's a bit too early yet to require C++17 so the implementation from
BackportCpp (string_view-standalone) is used instead.

Fixes https://crbug.com/oss-fuzz/34413 - slow message parsing on huge
messages. In real word, messages can't be that big, because CSocket
enforces a line length limit.

This can be considered a regression of 1.7.0, because before it, instead
of gathering params into a vector, code was searching 1st word in the
string, then 2nd word, then 3rd word, starting from beginning each time.
It was not very efficient, but the number of passes over the string was
limited.
2021-05-22 09:57:04 +01:00
MAGIC 99687b0f24 Welcome to 2021 2021-01-01 19:37:07 +01:00
Alexey Sokolov 1580140b3b Merge branch 'reorder' 2020-10-04 20:40:45 +01:00
njhanley 99b33eade9 Add MoveChan and SwapChans commands 2020-09-29 19:32:45 -04:00
Alexey Sokolov 47e633b267 Don't load modperl as a python module
Close #1757
2020-09-17 23:08:19 +01:00
njhanley 926d140a47 Respect order of subconfigs in znc.conf 2020-09-03 00:27:15 -04:00
NuclearW cf5472644a Add test for account-tag capability 2020-08-03 14:34:16 -04:00
Alexey Sokolov dff01490ca Merge branch '1.8.x' 2020-05-31 11:49:10 +01:00
Alexey Sokolov 2390ad111b Fix null pointer dereference in echo-message
The bug was introduced while fixing #1705. If a client did not enable
echo-message, and doesn't have a network, it crashes.

Thanks to LunarBNC for reporting this
2020-05-31 11:45:40 +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 8717badcfc Try fix flaky ZNCTest.AwayNotify 2020-04-21 23:09:11 +01:00
Alexey Sokolov e801c49740 Test #1715 2020-04-20 20:51:07 +01:00
Alexey Sokolov b1d4cb0ae5 Add test for sasl module 2020-03-29 13:46:59 +01:00
Alexey Sokolov d229761821 Fix echo-message for *status
Close #1705
2020-03-29 08:45:10 +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 34645658ab CMake: stop requiring C compiler 2020-01-05 11:28:49 +00:00
MAGIC 9081aa971d Welcome to 2020 2020-01-02 00:36:05 +01:00
Alexey Sokolov 16c849daac Fix crash when parsing incorrect channel modes sent by server.
Sometimes certain servers don't send a argument for modes which it
declared as ones which need an argument.

No released version is affected.

Close #1684
2019-11-07 08:36:41 +00:00
Alexey Sokolov b8b62a14ab Merge branch '1.7.x' 2019-11-06 08:46:05 +00:00
Alexey Sokolov c106d430eb Fix my recent fix and pass the parameter correctly 2019-11-06 00:00:34 +00:00
Alexey Sokolov 413f0d302f Merge branch '1.7.x' 2019-11-05 21:02:44 +00:00
Alexey Sokolov 961881b032 Build integration test with the same compiler
Fix https://bugs.gentoo.org/699258
2019-11-05 21:01:57 +00:00
Aspen (linudaemon) 95369455fc Rework MODE/RPL_CHANMODEIS handling for trailing args (#1661)
Some servers may send a colon even if the last parameter doesn't need it, currently this leads to issues with permission/mode tracking, as the core doesn't handle the colon properly.

This fix replaces reconstructing the parameter string with just passing a vector of the relevant parameters to CChan::SetModes() and adds overrides for CChan::SetModes() and CChan::ModeChange() that accept the vector instead.

Clean up uses of old CModeMessage::GetModes()
2019-08-08 21:54:49 +01:00
Jonathan Herlin e99cad4c25 Fix crypt module test (#1673) 2019-07-05 20:03:46 +01:00
Alexey Sokolov 0370efe830 Merge branch '1.7.x' 2019-04-19 12:15:14 +01:00
Alexey Sokolov 964747e6b4 Increase znc-buildmod timeout in the test.
For some slow systems 30s is too small.
2019-04-19 12:13:44 +01: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
Alexey Sokolov 0ab205ccfa Merge pull request #1628 from dgw/welcome-to-2019
Welcome to 2019
2019-01-08 22:50:58 +00:00