Commit Graph

98 Commits

Author SHA1 Message Date
J-P Nurmi
a79acacfad Add missing CModules::OnCTCPReplyMessage() 2015-09-02 00:51:05 +02:00
J-P Nurmi
448acbe0eb Fix custom CTCP replies (close #1052) 2015-08-31 23:20:43 +02:00
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
478f1952b7 Fix #1040: recent CMessage changes break modules 2015-08-23 12:48:17 +02:00
Alexey Sokolov
672e8c5731 Add OnRawMessage() 2015-08-23 00:52:27 +01:00
J-P Nurmi
b402c1e582 Merge branch '1.6.x'
Conflicts:
	src/IRCSock.cpp
2015-08-22 00:18:55 +02: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
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
50ab019901 CIRCSock::ReadLine(): use CMessage as a helper 2015-08-15 12:27:04 +02:00
J-P Nurmi
6a6fbab342 Replace Right(1)[0] with back() 2015-08-14 13:52:14 +02:00
J-P Nurmi
475acd8f00 Prefer TrimPrefix() over Left() + LeftChomp() 2015-08-14 12:29:42 +02:00
J-P Nurmi
0220979ccf Fix #124: OnChanMsg(): nick doesn't have perms 2015-08-11 23:29:19 +02:00
Gustavo Zacarias
9a51195e91 Add <time.h> includes where appropiate
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2015-08-06 11:20:54 -03:00
J-P Nurmi
824cb3cc56 Merge pull request #1011 from jpnurmi/disconkick
src/IRCSock.cpp: use *status as kicker
2015-08-01 01:02:14 +02:00
J-P Nurmi
405546e94c src/IRCSock.cpp: use *status as kicker
Closes #649
2015-07-28 17:45:18 +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
d18601180b Align server-side cap handling code with the client-side
Based on d7a6a136db - to make it more
straight-forward to add support for more server-side capabilities.
2015-07-14 16:57:53 +02:00
J-P Nurmi
1fb321703d Add away-notify support - close #315 2015-07-05 13:33:27 +02:00
Alexey Sokolov
2f65dbbc64 Integrate disconkick module to core.
Fix #968
2015-06-04 22:02:39 +01:00
Alexey Sokolov
8552ca0ff9 Bump accepted line length to 2048
To allow message tags and still have some buffer for cases
when server sends too long lines

Related to #971
2015-06-04 08:05:15 +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
a5b4a29c00 Revert StripControls implementation (#850)
This reverts commits 27d78795a7 and
f27109f1b4. It was decided that the
functionality is provided by a separate module instead, to avoid
unnecessarily bloating the core.
2015-03-04 09:50:00 +01:00
J-P Nurmi
1d2650d450 Use member initialization lists [-Weffc++] (#270) 2015-03-01 15:00:10 +01:00
J-P Nurmi
6a6bb648d1 Use member initialization lists [-Weffc++] (#270) 2015-02-28 21:59:01 +01:00
Alexey Sokolov
e9294e4c81 Merge pull request #898 from jpnurmi/nullptr
Search'n'replace remaining NULL occurrences (#816)
2015-02-26 21:18:37 -08:00
J-P Nurmi
75b210e841 Search'n'replace remaining NULL occurrences (#816) 2015-02-26 20:58:01 +01:00
J-P Nurmi
fd97557ec8 CIRCSock: C++11 range-based for loops 2015-02-26 11:54:21 +01:00
J-P Nurmi
6002bd5c2b Remove unnecessary virtual keyword occurrences
This makes it convenient to 'grep virtual' and 'grep override' :)
2015-02-25 18:33:09 +01:00
J-P Nurmi
ef9939e1ec Add override (#816)
Changes applied by 'clang-modernize -add-override [...]'
2015-02-25 09:24:00 +01:00
J-P Nurmi
70c0ffb10b Use nullptr (#816)
Changes applied by 'clang-modernize -use-nullptr [...]'
2015-02-25 09:20:20 +01:00
ManiacTwister
27d78795a7 Also strip controls from private messages 2015-02-23 22:15:01 +01:00
ManiacTwister
f27109f1b4 Implemented StripControls for channel messages and notices 2015-02-23 22:14:58 +01: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
Alexey Sokolov
94f2b4dc97 Don't expose ZNC version in CTCP VERSION.
Thanks to Mikaela for finding this.
See #818
2015-01-18 08:15:34 +00:00
Alexey Sokolov
38353a67d7 Remove message which should be removed before release 2015-01-18 00:00:15 +00:00
Alexey Sokolov
600f91f128 Fix implicit context of OnSendTo* hooks
Thanks for markus-j for reporting it
2015-01-11 17:08:00 +00:00
Falk Seidel
2e29d49a53 Welcome to 2015 2014-12-31 11:28:38 +01:00
Alexey Sokolov
5c72c8232f Show fingerprints with colons 2014-12-23 00:58:59 +00:00
Alexey Sokolov
8930fc4d7a Don't break IRC control characters in some encodings
Fix #577
2014-12-21 17:09:59 +00:00
Alexey Sokolov
60ec923d1f Fix calculation of SSL fingerprints 2014-12-14 09:58:00 +00:00
Alexey Sokolov
4442af724f Validate TLS certificate of IRC server.
Fix #156
2014-11-29 14:25:15 +00:00
J-P Nurmi
78a0331daa CIRCNetwork: add support for join delay (resolves #586) 2014-10-15 22:24:39 +02:00
J-P Nurmi
4fe249280e Fix GetClients() const correctness
It’s dangerous to give a non-const reference to an internal
container that the API users are not supposed to modify.
2014-10-03 09:11:03 +02:00
J-P Nurmi
fb99593f75 Allow network specific quit messages (resolves #273) 2014-09-13 23:40:22 +02:00
J-P Nurmi
6d08bc60cf Fix #664: Custom CTCP will leak the real reply 2014-09-13 12:58:10 +02:00
J-P Nurmi
e6a7bbab75 Fix #631: ZNC fails at finding an available nick name 2014-08-19 18:15:26 +02:00