Commit Graph

143 Commits

Author SHA1 Message Date
Alexey Sokolov
1f226d2ade Add test for #1229 and actually fix it. 2016-01-09 18:00:47 +00:00
Alexey Sokolov
4fe4a45dd6 Disable legacy encoding mode when modpython is loaded.
Python is not happy when using non-unicode text as str.

Fix #1229
2016-01-09 14:18:24 +00:00
Ondřej Nový
6881ca5b8f Fixed few misspellings 2016-01-05 20:45:08 +01:00
Falk Seidel
8f73840e74 Welcome to 2016
🎆  Happy 2016 🎆
2016-01-01 20:11:21 +01:00
Alexey Sokolov
d185d6f22d clang-format: switch tabs to spaces
I like tabs, but I have to admit that spaces make source code more
consistent, because every editor/viewer tends to render tabs differently :(
2015-12-07 00:53:30 +00:00
Alexey Sokolov
3861b6a583 Fix several comments broken by clang-format 2015-12-07 00:53:01 +00:00
Alexey Sokolov
33b0627d75 Add clang-format configuration.
For now, it uses tabs like before, to make the diff easier to read/check.
One of following commits will switch it to spaces.
2015-12-07 00:53:01 +00:00
Alexey Sokolov
569f057561 Call CTCP callback for actions too, as it was before switch to CMessage.
Partyline had both of callbacks, one of which is redundant.

Fix #1134
Fix #1190
2015-11-29 00:59:50 +00:00
Alexey Sokolov
103ed00861 Move Message assertions to special cast operators.
Don't use static_cast directly anymore, but use these operators.
2015-11-21 12:13:54 +00:00
J-P Nurmi
3cb2834cc5 Fix STATUSMSG buffering 2015-09-21 15:41:20 +02:00
J-P Nurmi
7d10ad2625 CBuffer: add CMessage-based API 2015-09-20 23:22:03 +02:00
J-P Nurmi
dce6d4f0ea Make CClient::PutClient() handle multi-prefix 2015-09-20 23:22:02 +02:00
J-P Nurmi
f7802209ae Make CClient::PutClient() handle extended-join 2015-09-20 23:22:02 +02:00
J-P Nurmi
f4c22aff6c Incorporate CIRCSock::ForwardRaw353() into CClient::PutClient() 2015-09-20 23:22:02 +02:00
J-P Nurmi
69f1138052 CClient::PutClient(): handle away-notify and account-notify 2015-09-20 23:22:02 +02:00
J-P Nurmi
0f2a37707f CIRCSock::OnNumericMessage(): replace Token(n) with GetParam(m)
CMessage has already done the work to split the line to params.
2015-09-20 23:22:01 +02:00
J-P Nurmi
cb84ecac9c Port CIRCSock::ParseISupport() to use CMessage 2015-09-20 23:22:01 +02:00
J-P Nurmi
ba76e041b9 Add OnNumericMessage() module hook (close #1069) 2015-09-07 16:41:15 +02:00
J-P Nurmi
c7cb7fca3f Cleanup CIRCSock::ReadLine() 2015-09-07 00:00:28 +02:00
J-P Nurmi
dae21026fa CIRCSock::OnErrorMessage() handler 2015-09-07 00:00:28 +02:00
J-P Nurmi
41b71e3a40 CIRCSock::OnPing/PongMessage() handlers 2015-09-07 00:00:28 +02:00
J-P Nurmi
da06aacd4d CIRCSock::OnNumericMessage() handler 2015-09-07 00:00:28 +02:00
J-P Nurmi
0446aaa929 CIRCSock::OnModeMessage() handler 2015-09-07 00:00:27 +02:00
J-P Nurmi
b8dbdb0a4b CIRCSock::OnWallopsMessage() handler 2015-09-07 00:00:27 +02:00
J-P Nurmi
1346718308 CIRCSock::OnCapabilityMessage() handler 2015-09-07 00:00:27 +02:00
J-P Nurmi
d3f42cabeb CIRCSock::OnInviteMessage() handler 2015-09-07 00:00:27 +02:00
J-P Nurmi
05fbb52173 CIRCSock::OnAccountMessage() handler 2015-09-07 00:00:27 +02:00
J-P Nurmi
d556a29218 CIRCSock::OnAwayMessage() handler 2015-09-07 00:00:27 +02:00
J-P Nurmi
d53a2d1f24 CIRCSock::OnTextMessage() handler 2015-09-07 00:00:27 +02:00
J-P Nurmi
236bd7249f CIRCSock::OnActionMessage() handler 2015-09-07 00:00:26 +02:00
J-P Nurmi
74be5522d1 CIRCSock::OnCTCPMessage() handler 2015-09-07 00:00:26 +02:00
J-P Nurmi
30bb92fec3 CIRCSock::OnNoticeMessage() handler 2015-09-07 00:00:26 +02:00
J-P Nurmi
b459cdf85b CIRCSock::OnTopicMessage() handler 2015-09-07 00:00:26 +02:00
J-P Nurmi
3349011a12 CIRCSock::OnKickMessage() handler 2015-09-07 00:00:26 +02:00
J-P Nurmi
9f9304a253 CIRCSock::OnPartMessage() handler 2015-09-07 00:00:26 +02:00
J-P Nurmi
a2110da245 CIRCSock::OnJoinMessage() handler 2015-09-07 00:00:26 +02:00
J-P Nurmi
a0a2b0fb4e CIRCSock::OnQuitMessage() handler 2015-09-07 00:00:25 +02:00
J-P Nurmi
41a9b36687 CIRCSock::OnNickMessage() handler 2015-09-07 00:00:25 +02:00
J-P Nurmi
c4a216c554 CIRCSock::ReadLine(): use CMessage::GetType() 2015-09-07 00:00:25 +02:00
J-P Nurmi
17d07d5a74 CIRCSock: handle raw 352 (RPL_WHOREPLY) using CMessage 2015-09-07 00:00:25 +02:00
J-P Nurmi
795ea45f69 CIRCSock::ForwardRaw353(): use CMessage 2015-09-07 00:00:24 +02:00
J-P Nurmi
fa894a86b0 Add CNumericMessage 2015-09-07 00:00:24 +02:00
J-P Nurmi
2880368825 Merge pull request #1055 from jpnurmi/onctcpreplymessage
Add missing CModules::OnCTCPReplyMessage()
2015-09-03 20:11:38 +02:00
J-P Nurmi
2b18d6ee38 Merge pull request #1020 from jpnurmi/traffic
Calculate per-network traffic (#963)
2015-09-02 01:01:13 +02:00
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