96 Commits

Author SHA1 Message Date
Falk Rund
ad6a397ca4 Welcome to 2026
[skip ci]
2026-01-01 13:44:32 +01:00
Alexey Sokolov
2f02a9ea00 Merge branch 'master' into unix 2025-05-01 22:41:27 +01:00
Alexey Sokolov
d3a7f125cf Make unix sockets work from modules 2025-04-20 08:31:36 +01:00
Alexey Sokolov
5befe2f7f8 Implement invite-notify 2025-04-18 22:23:01 +01:00
Alexey Sokolov
f93829e3b3 Implement message-tags spec
Message tags were supported already, but not arbitrary tags, and not
TAGMSG
2025-04-11 21:28:10 +01:00
Alexey Sokolov
93e364b296 Add modpython sasl test 2025-03-15 22:43:35 +00:00
Alexey Sokolov
6e9980d67f Various SASL changes 2025-02-22 15:59:52 +00:00
Alexey Sokolov
4ef64eb4d5 rename next sasl module hook 2025-02-13 21:36:07 +00:00
Alexey Sokolov
c8266aafda Rename new callback, fix build 2025-02-13 21:22:09 +00:00
Alexey Sokolov
41a0030fdb Merge branch 'master' into sasl
Conflicts:
	include/znc/Client.h
	src/Client.cpp
	src/Modules.cpp
	test/integration/tests/modules.cpp
2025-02-13 20:37:32 +00:00
Peter
44e4b95a20 Welcome to 2025 (#1929) 2025-02-07 23:23:45 +00:00
Alexey Sokolov
4b1a524a72 Move extended-join test to integration test
Fix build of modperl/modpython
2024-01-14 01:46:12 +00:00
Alexey Sokolov
1d3b33354f Merge branch 'master' into cap302 2024-01-06 20:36:24 +00:00
Falk Rund
17a004aa0b Welcome to 2024
[skip ci]
2023-12-31 21:09:25 +01:00
Alexey Sokolov
4cbccac707 Merge branch 'master' into cap302 2023-11-19 10:53:47 +00: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
delthas
1dd995ef77 Reabse and address PR comments 2023-08-31 14:35:49 +02: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
Falk Rund
f9fd05c307 Welcome to 2023 2023-01-01 06:49:00 +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
5b5ab5cf83 Support python 3.9
Fix #1702
2020-01-05 11:18:44 +00:00
MAGIC
9081aa971d Welcome to 2020 2020-01-02 00:36:05 +01:00
dgw
8d5427cf9b Welcome to 2019
What are we going to do today, Brain?

The same thing we do every year, Pinky: Update all the copyright
headers!

[Skip CI]
2019-01-01 17:05:05 -06: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
Falk Seidel
d647eaabc0 Welcome to 2018
The same procedure as last year, Miss Sophie?
The same procedure as every year, James.

[skip ci]
2018-01-19 19:38:58 +00:00
Alexey Sokolov
7e94158c6d More strings to translate #1354 2017-09-08 00:03:27 +01:00
MuffinMedic
74ab8e59d3 Add CQuery(s) and CServer(s) to modpython 2017-08-27 14:27:25 -04:00
Alexey Sokolov
ef5ace9b86 Travis: Also count code coverage of modpython 2017-05-28 08:52:37 +01:00
Eli Young
823ac07240 Add OnSendToIRCMessage and OnSendToClientMessage
This also alters PutClient such that the CMessage variant handles
sending messages, rather than the CString variant. As a side bonus, this
gives callers better information on whether the message was sent to the
client. Additionally, it eliminates the need for a hook to let modules
set the tags sent to a client, as that can now be done inside
OnSendToClientMessage.
2017-04-18 15:43:16 -07:00
Phansa
3189ce7f8a Welcome to 2017
Welcome to 2017

temp

temp2
2017-03-12 20:34:26 -04:00
Alexey Sokolov
455b5f8076 Merge branch '1.6.x' 2017-02-19 10:33:01 +00:00
Alexey Sokolov
0679957340 Fix regression of 1.6.4 which caused crash in modperl/modpython.
See #1283
2017-02-19 10:30:44 +00:00
Alexey Sokolov
1bb0199ec4 Fix missing renames in #1191 2017-01-08 10:06:21 +00:00
Alexey Sokolov
cc653efb6b Rename translation methods to be not one letter.
It fixes several warnings, when the name was shadowed by a local "p".
2016-09-12 00:01:45 +01:00
Alexey Sokolov
8863bed13d Support translation in python modules 2016-01-31 20:09:19 +00:00
Falk Seidel
8f73840e74 Welcome to 2016
🎆  Happy 2016 🎆
2016-01-01 20:11:21 +01:00
Alexey Sokolov
cbf5c38d0a Teach modperl and modpython about CMessage and new hooks which accept it.
Fix #1084
Fix #1085
2015-11-22 23:39:30 +00:00
J-P Nurmi
e62ed5f300 modperl & modpython: fix GetType() at module construction time 2015-03-07 21:54:33 +01:00
OGAWA Hirofumi
feec20b013 Add OnUserQuit() for extending clearbufferonmsg
Add OnUserQuit() callback. On smartphone, user doesn't want to see
same lines repeatedly. But, meanwhile, user doesn't want to miss lines
when connection was lost.

To do it, this uses OnUserQuit() callback. With this callback,
clearbufferonmsg can clear buffer if user quited client explicitly.
And when connection was lost, buffer is still not cleared.
2015-02-22 04:33:14 +09:00
Falk Seidel
2e29d49a53 Welcome to 2015 2014-12-31 11:28:38 +01:00
Martin Martimeo
a66c6164a7 Release python/swig ownership when adding object created in python to ZNC container
Patch by MartinMartimeo (#538)
2014-12-16 13:40:06 +00:00
Alexey Sokolov
15283da006 Merge pull request #721 from markusj/modpy-can-have-args
modpython: Use has_args and args_help_text from module
2014-10-29 06:38:28 +00:00
Alexey Sokolov
1a8f15d510 Support CZNC::GetUserMap() from modpython.
Thanks to lol768 for reporting it.
2014-10-28 07:22:50 +00:00
Markus Jung
79d8ae7432 modpython: set has_args and args_help_text from module 2014-10-28 01:23:31 +01:00
Alexander Færøy
db0e0995e2 Add OnJoining module hook.
This patch adds an OnJoining module hook that allows a module to allow
or disallow joining any given channel.
2014-05-29 23:10:30 +02:00