Commit Graph

51 Commits

Author SHA1 Message Date
J-P Nurmi
d0a58ff239 Pass CMessage to buffer playback hooks 2015-08-15 13:03:56 +02:00
J-P Nurmi
ff181a4a85 Add specialized types and hooks for the most common msgs
PRIVMSG, NOTICE, JOIN, PART, QUIT, NICK, KICK, TOPIC
2015-08-15 12:27:06 +02:00
J-P Nurmi
2417ca68a8 Prefer Contains() over find() != npos 2015-08-14 13:55:11 +02:00
J-P Nurmi
7839a596a3 modules: make help more compact
Same as c7b2aea7da but for modules
2015-04-26 21:53:59 +02:00
J-P Nurmi
d16f35facc CModule: use member initialization lists [-Weffc++] (#270)
This fixes the problem that CModule::GetType() returned a random
uninitialized value in CModule constructor, which was als the reason
for #905. CModule constructor signature has been changed so that it
optionally takes the type so it can be initialized appropriately.

The new type argument has a default value in order to retain source
compatibility in case some 3rdparty module would call CModule ctor
by hand instead of using the MODCONSTRUCTOR macro.
2015-03-07 21:54:33 +01:00
J-P Nurmi
6a6bb648d1 Use member initialization lists [-Weffc++] (#270) 2015-02-28 21:59:01 +01:00
J-P Nurmi
75b210e841 Search'n'replace remaining NULL occurrences (#816) 2015-02-26 20:58:01 +01:00
Alexey Sokolov
0794e602a7 Merge pull request #889 from jpnurmi/c++11
Replace some C++98isms with C++11isms (#816)
2015-02-25 22:00:06 -08:00
J-P Nurmi
70c0ffb10b Use nullptr (#816)
Changes applied by 'clang-modernize -use-nullptr [...]'
2015-02-25 09:20:20 +01:00
J-P Nurmi
6084990163 CModules: C++11 range-based for loops 2015-02-25 07:58:37 +01:00
OGAWA Hirofumi
c6d093a53a Change to return the value from OnUserQuit() as request 2015-02-22 04:33:15 +09: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
J-P Nurmi
00b1a7eedf Use CString::StartsWith()
Replace the use of deprecated CString::Equals(str,bool,int) by
CString::StartsWith(str,cs) which is more pleasant to read.
2015-02-18 00:42:25 +01:00
Falk Seidel
2e29d49a53 Welcome to 2015 2014-12-31 11:28:38 +01:00
J-P Nurmi
80b799cec0 Pass timestamp to playline hooks
This allows implementing timestamp-based (eg. client specific - #343)
filtering of playback buffers. For clients that don't support server-time,
getting an accurate timestamp out of a raw buffer playline is impossible.
2014-11-27 20:45:35 +01:00
Alexey Sokolov
c1dc3e83d2 Support lambdas in module commands 2014-10-26 22:09:24 +00:00
Alexey Sokolov
e337cb433d Merge commit 'refs/pull/665/head' of github.com:znc/znc 2014-10-26 12:17:31 +00:00
J-P Nurmi
5206e71bdb Fix CModules::LoadModule() return message handling
[ >> ] This is an example[This is an example] [/path/to/mod.so]

becomes:

[ >> ] This is an example [/path/to/mod.so]
2014-10-14 22:17:52 +02:00
J-P Nurmi
2901225ff3 Tell user about no help filter matches
It's confusing if misspelled command gives no reply at all.
2014-09-13 22:48:21 +02:00
J-P Nurmi
69e65ea45e Allow wildcards in help command args
Supports the help command for *status, all modules that are using
CModCommand as appropriate, and *controlpanel get/set variables.
2014-09-13 22:46:54 +02:00
Uli Schlachter
7704bc49d7 client auth: Switch from CSmartPtr to std::shared_ptr
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-09-12 15:12:46 +02:00
Alexey Sokolov
8ec2a0940c Merge pull request #629 from jpnurmi/help
Revise *status and *controlpanel help output
2014-09-07 16:24:49 +01:00
J-P Nurmi
df08352148 Revise *controlpanel help output
Make the output easier to read by wrapping mandatory argument names
with angle brackets (just like in *status help), and make it possible
to output help for given command(s). Furthermore, output only relevant
variable lists and align casing & arguments in general help & command
specific usage output.
2014-09-07 10:54:00 +02:00
J-P Nurmi
2e42f3103c Fix #624: Can´t rename network via webinterface 2014-09-06 23:15:50 +02:00
J-P Nurmi
7387f00408 Get rid of the module questions during --makeconf
The following modules are enabled by default:
- global: webadmin
- user: controlpanel, chansaver
- network: simple_away

This reduces a lot makeconf noise and fixes #541.
2014-08-17 15:37:50 +02:00
Uli Schlachter
308df21511 Modules: Add a module version of CJob
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 15:32:41 +02: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
Alexey Sokolov
9cf61ac6d4 Argh, fuck it. Rename fixed (pointer) versions of OnMode to OnMode2 2014-04-12 08:51:04 +01:00
J-P Nurmi
76bfa99dd0 Add module hooks for raw client and server messages 2014-03-04 00:24:15 +01:00
Alexey Sokolov
618d9c58a4 Fix chansaver's channel keys by adding other OnMode() hooks 2014-02-27 00:49:45 +00:00
Falk Seidel
f19b4caa43 Welcome to 2014 - year 10 with ZNC 2013-12-31 10:10:55 +01:00
Ingmar Runge
b5c898eaff modules: add OnAddNetwork, OnDeleteNetwork hooks. 2013-10-18 20:35:21 +02:00
Alexey Sokolov
b2dcad5fd4 Change ZNC license to Apache 2.0
The following people agreed with the change, in alphabetical order:
(people who approved in several ways are listed only once)
By email:
- Adam (from Anope)
- Austin Morton
- Brian Campbell
- Christian Walde
- Daniel Holbert
- Daniel Wallace
- Falk Seidel
- Heiko Hund
- Ingmar Runge
- Jim Hull
- Kyle Fuller
- Lee Aylward
- Martin Martimeo
- Matt Harper
- Michael J Edgar
- Michael Ziegler
- Nick Bebout
- Paul Driver
- Perry Nguyen
- Philippe (cycomate)
- Reuben Morais
- Roland Hieber
- Sebastian Ramacher
- Stefan Rado
- Stéphan Kochen
- Thomas Ward
- Toon Schoenmakers
- Veit Wahlich
- Wulf C. Krueger

By IRC:
- CNU
- Jonas Gorski
- Joshua M. Clulow
- Prozac/SHiZNO
- SilverLeo
- Uli Schlachter

At https://github.com/znc/znc/issues/311 :
- Alexey Sokolov
- Elizabeth Myers
- flakes
- Jens-Andre Koch
- Jyzee
- KindOne/ineedalifetoday
- Lee Williams
- Mantas Mikulėnas
- md-5
- Reed Loden

At the last few pull requests' comments:
- Allan Odgaard
- Jacob Baines
- Lluís Batlle i Rossell
- ravomavain
- protomouse

The following commits' authors didn't respond:
Trivial changes:
- f70f1086fd
- 4ca8b50e45

The changes which are not presented in master anymore:
- 5512ed2ea0
- 960a4498f7
- 0f739de2c0
- 7f53cc810b

Fix #311
Fix #218
2013-06-14 00:43:34 +04:00
baines
c256116d81 Catch as references 2013-02-26 22:03:15 -05:00
Alexey Sokolov
0491e55926 Fix one more case of dlerror(), if it returns NULL after error. 2013-01-27 01:48:27 +07:00
Alexey Sokolov
7312a36629 Don't lose dlerror() message.
Some weird systems seem to use dl functions while doing std::string
concatenation...

Thanks to Hoss for reporting it
2013-01-27 01:26:52 +07:00
Un1matr1x
3a34593359 The same procedure as last year, Miss sophie?
Same procedure as every year, James.
2012-12-31 12:44:31 +01:00
Alexey Sokolov
4036114975 Add CModule::ExpandString()
It chooses which ExpandString() to call, of user or of network.
2012-11-23 21:40:30 +07:00
Alexey Sokolov
da336049b3 Fix linkage on cygwin.
ZNC_NO_NEED_TO_DO_ANYTHING_ON_MODULE_CALL_EXITER is required in
libznc.dll, but it was defined in main.cpp

Again thanks to Lizzy Eilson
2012-08-19 16:30:47 +07:00
Kyle Fuller
67299ebfa8 Fix a bunch of conversion warnings #197 2012-08-14 19:31:14 +07:00
Alexey Sokolov
27aa7036f5 Fix #117 2012-08-10 19:32:27 +07:00
Kyle Fuller
8a44c87272 Don't require CTimer's label to be unique if its empty (Fixes #92) 2012-07-28 00:09:15 +07:00
Alexey Sokolov
62c9ac1a0b using in headers is evil :( 2012-07-26 20:46:11 +07:00
Alexey Sokolov
3aa6b581fc Csock: able use non-int number of secs for timer.
This patch happened in upstream csocket too, so update won't break
anything.
2012-03-20 09:03:44 +07:00
Alexey Sokolov
7ac61474ed ZNC-Extra no more.
Few the most useless modules are just removed, the others are moved to
standard modules.
2012-02-21 19:34:36 +07:00
Kyle Fuller
b1ed9c9b74 Add methods to CModule to get the web path
Add these values to the template and use them when linking to any module
2012-02-09 17:07:28 +00:00
Un1matr1x
73270ff023 Welcome in 2012 2012-01-01 09:30:19 +01:00
Kyle Fuller
b8c2da95f1 Make the OnInvite hook return EModRet so we can ignore invites 2011-10-21 00:20:58 +00:00
Kyle Fuller
e11d338040 Pass the nick who send an invite with the OnInvite hook 2011-10-20 23:44:03 +00:00
Alexey Sokolov
2c1ca45353 Merge branch 'headers' 2011-09-28 20:15:20 +07:00