Commit Graph

300 Commits

Author SHA1 Message Date
J-P Nurmi
320abef756 Merge CChanMessage & CPrivMessage to... CTextMessage
This naming is a bit hairy. I chose CTextMessage because this type of
message carries a text argument. Alternatively, it could be also called
CPrivateMessage, because the IRC protocol calls it PRIVMSG. On the other
hand, ZNC module hooks use the "Priv" naming convention for private
messages. It would look a bit weird to have OnChanMsg(CPrivMessage)...

More details and reasoning of the merge in the previous commit message.
2015-08-30 15:50:12 +02:00
J-P Nurmi
3976651c35 Merge CChan+PrivAction, CChan+PrivCTCP, CChan+PrivNotice
OnUserAction(), OnUserCTCP(), and OnUserNotice() don't separate private
private and channel messages. A module could even redirect a message by
modifying its target, so technically, if they were two distinct types,
the type of a message could change on the way.

The original reason for the separation was that at some point during
CMessage development, GetChan() didn't exist in CPrivXxx, but only in
CChanXxx message types. To achieve cleaner implementation, the getter
was later promoted to CMessage and made return nullptr for non-channel
specific messages. From this point of view, the separation is also no
longer necessary since the CPrivXxx and CChanXxx types are API-wise
identical with each other.
2015-08-30 15:50:12 +02:00
J-P Nurmi
0ecc0d464f Make params optiona for the CMessage(CNick, CString, ...) ctor
Also fixes the build for Clang <= 3.4, broken by 9a7df7c.
2015-08-27 13:21:45 +02:00
Toon Schoenmakers
03e3920ced Add options for log module to hide joins, quits and nick changes.
Fix #601
Close #613
2015-08-23 21:20:36 +01:00
Alexey Sokolov
672e8c5731 Add OnRawMessage() 2015-08-23 00:52:27 +01:00
J-P Nurmi
e1ae565e6f Fix GetText() for CTCP [ACTION]
Just like the recent problem with smileys; TrimLeft() is not the same
than TrimPrefix(), and TrimRight() is not the same than TrimSuffix().
2015-08-23 00:48:35 +02:00
Alexey Sokolov
e546cedaa2 Merge pull request #1035 from jpnurmi/server-time
Make ZNC request server-time when available (close #839)
2015-08-20 22:31:24 +01:00
J-P Nurmi
1f11b10b70 Make ZNC request server-time when available (close #839) 2015-08-18 01:42:42 +02:00
J-P Nurmi
d19a040f2d Remove flawed Add/Del/List/BindHost(s) (close #983) 2015-08-17 15:35:29 +02:00
J-P Nurmi
d77d21cfb9 Document CClient::PutClient() 2015-08-16 13:38:33 +02:00
J-P Nurmi
d0a58ff239 Pass CMessage to buffer playback hooks 2015-08-15 13:03:56 +02:00
J-P Nurmi
8a7c79bb78 Pass known/compatible tags to clients 2015-08-15 12:33:23 +02:00
J-P Nurmi
c17c8c022b Buffer message tags and the original timestamps 2015-08-15 12:28:38 +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
a06bf1c985 Introduce a Message type (#506) 2015-08-15 12:26:16 +02:00
J-P Nurmi
51caa5c4cf Add CUtils::ParseServerTime() 2015-08-15 12:26:16 +02:00
J-P Nurmi
a13b4a8e46 CZNC: add missing SSL-related getters and setters
- SSLCiphers
- SSLProtocols
- SSLCertFile
2015-08-05 01:05:46 +02:00
J-P Nurmi
f266b54e6e Fix ClearTrustedFingerprints() casing 2015-08-05 00:44:51 +02:00
J-P Nurmi
66413ae516 Add CIRCNetwork::ClearTrustedFingerPrints() 2015-08-05 00:35:16 +02:00
J-P Nurmi
dce289a5d4 CUser: add API for removing and clearing allowed hosts 2015-08-04 16:09:27 +02:00
J-P Nurmi
9fe1027d8a Add missing CChan::GetNetwork() 2015-08-02 23:40:12 +02:00
J-P Nurmi
b16faf5058 Merge pull request #990 from jpnurmi/reset
Allow reseting channel specific AutoClearChanBuffer & Buffer settings
2015-08-01 12:30:36 +02:00
J-P Nurmi
015a8f6502 Merge branch '1.6.x'
Conflicts:
	src/Client.cpp
	znc-buildmod.in
2015-07-31 23:56:04 +02:00
J-P Nurmi
2098dc1f2c Merge pull request #992 from jpnurmi/fail2ban
fail2ban: configurability & commands
2015-07-31 23:32:15 +02:00
J-P Nurmi
53d9161b20 Merge pull request #998 from jpnurmi/buffer
Resolve #967: separate chan & query buffer size settings
2015-07-31 22:51:03 +02:00
J-P Nurmi
87ae630046 Merge pull request #991 from jpnurmi/initializer_list
Add initializer_list ctors for CString & MCString
2015-07-31 22:08:43 +02:00
Alexey Sokolov
baa798ce9f Fix -DVERSION_EXTRA="foo"
It was broken since 58a34fa5ad (since ZNC 1.2)
2015-07-21 22:47:09 +01:00
J-P Nurmi
496a132e32 Resolve #967: separate chan & query buffer size settings 2015-07-19 00:31:10 +02:00
J-P Nurmi
6246899c56 Add support for extended-join (#316) 2015-07-14 18:29:33 +02:00
J-P Nurmi
d070a6e644 Add support for account-notify (#316) 2015-07-14 17:02:16 +02:00
J-P Nurmi
f506a59993 Add TCacheMap::GetItems() 2015-07-13 23:51:25 +02:00
J-P Nurmi
1aba508298 Add initializer_list ctors for CString & MCString 2015-07-13 19:04:14 +02:00
J-P Nurmi
0d75018157 Allow reseting channel specific AutoClearChanBuffer & Buffer settings
The trick is to set the value to "-" in controlpanel. Notice that
controlpanel supports wildcards, so this can be used to easily
reset all channels back to defaults if desired.
2015-07-08 22:56:18 +02:00
J-P Nurmi
1fb321703d Add away-notify support - close #315 2015-07-05 13:33:27 +02:00
J-P Nurmi
089a0fd925 Add cap-notify support
This change alone doesn’t notify any capabilities to clients, but makes
ZNC itself offer cap-notify and builds the foundations for various
notifiable capabilities, such as away-notify, can be easily added.
2015-07-05 13:33:27 +02:00
Alexey Sokolov
e8d0dcc2bc Merge commit 'refs/pull/980/head' of github.com:znc/znc 2015-06-29 20:28:48 +01:00
Alexey Sokolov
5faaf67f48 Fix doxygen of CModule::GetNetwork() and CModule::GetClient()
Thanks to BtbN for reporting this.
2015-06-23 21:06:25 +01:00
Mikaela Suomalainen
3aec1c73f2 IRCNetwork.h: lower ping frequency & timeout
Ref: #979
2015-06-22 08:25:14 +03:00
J-P Nurmi
e3954f4824 Implement IRCv3.2 echo-message capability on the "client side"
http://ircv3.net/specs/extensions/echo-message-3.2.html

TODO: Add echo-message support to CIRCSock when IRCds start supporting it.
Manual echoing won't be necessary for networks that support echo-message.
2015-04-26 19:49:39 +02:00
Alexey Sokolov
4f4872a899 Update comment about CTable 2015-04-19 22:51:24 +01:00
Alexey Sokolov
00404b8cbb Revert "Make tables... not so tabular."
This reverts commit 2c3064fb56.
2015-04-18 17:38:56 +01:00
Alexey Sokolov
144f7984e4 Don't require CSRF token for POSTs if the request uses HTTP Basic auth.
See #946
2015-04-16 20:57:29 +01:00
Alexey Sokolov
926989342c Cleanup CTable after making it not a table earlier 2015-04-09 21:12:21 +01:00
Alexey Sokolov
1df5d91a53 Merge branch '1.6.x' 2015-04-09 21:06:09 +01:00
Alexey Sokolov
2c3064fb56 Make tables... not so tabular.
Fix #743
Fix #914
Close #922
2015-04-09 07:34:00 +01:00
Thomas Kriechbaumer
a56d4cae6a do not call OnAddUser hook during ZNC startup 2015-03-31 12:15:40 +01:00
Thomas Kriechbaumer
28bb50fa1a refactor config parsing 2015-03-31 12:15:40 +01:00
J-P Nurmi
5aa8b0dcef Fix copy ctor/assignment oper warnings of -Weffc++ (#270) 2015-03-07 21:54:33 +01:00
J-P Nurmi
e1ada6c643 TDNSTask & CDNSJob: use member intialization lists [-Weffc++] (#270) 2015-03-07 21:54:33 +01: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