Commit Graph

159 Commits

Author SHA1 Message Date
Alexey Sokolov 80b96f3d46 Fix redirecting message
Thanks rockytvbr
2018-05-06 22:05:12 +01:00
Alexey Sokolov 1eceb5a5c7 More translateable strings (#1354) 2018-04-01 00:35:51 +01:00
Alexey Sokolov a8d2df3852 Add PutIRC(CMessage) and PutIRCRaw()
Close #1193
2018-03-11 16:44:49 +00:00
Alexey Sokolov a2470b3dd3 Make chan modes and permissions to be char instead of unsigned char.
Deprecate old module hooks which accept mode as unsigned char.

SWIG handles unsigned char as int, but char as a string.
Before this commit, usage of HasPerm from perl modules required this:
either $chan->HasPerm(ord('@')) or $chan->HasPerm(ord($ZNC::CChan::Op)).
Now ord() is not necessary, and these calls work too:
$chan->HasPerm('@') and $chan->HasPerm($ZNC::CChan::Op).

Fix #1486
2018-02-10 15:55:55 +00: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 9bb8387745 Revert "Avoid calling OnWho on every channel in the network WHO was called in. (#1461)"
This reverts commit 5132ea987e.

Add a comment to explain the old behavior, by courtesy of @psychon
2017-12-10 09:53:00 +00:00
weabot 5132ea987e Avoid calling OnWho on every channel in the network WHO was called in. (#1461) 2017-12-02 23:31:04 +00:00
Alexey Sokolov 57ad5cd814 Merge pull request #1445 from Zarthus/fix/debug-shows-pass
debugging: Add Filter method to hide filter sensitive data
2017-10-04 19:06:50 -07:00
Alexey Sokolov d73a4090c8 Fix crash caused by an unsigned overflow.
Thanks to Joseph Bisch for discovery.
This was an artifact of converting ZNC to use CMessage. Released
versions are not affected.
2017-10-03 15:21:56 +01:00
Jos Ahrens f006e31fed debugging: Add Filter method to hide filter sensitive data 2017-10-02 14:09:45 +02:00
Alexey Sokolov a719ea36aa Make disconkick a module again.
While not kicking upon disconnect can cause desync with client and other
issues, there were multiple complains about the new behavior, and the
user should have the choice.

Revert 2f65dbbc64
Ref #968
2017-08-26 22:18:53 +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
Eli Young 20b635aad7 Don't try to quit multiple times (#1392)
Calls to CIRCSock::Quit() eventually result in the object's destructor
being called, which itself calls CIRCSock::Quit() again. Avoid sending
multiple quit messages to the remote server by checking if the
underlying socket is already marked for closing.
2017-04-10 00:10:00 +01:00
Phansa 3189ce7f8a Welcome to 2017
Welcome to 2017

temp

temp2
2017-03-12 20:34:26 -04:00
Alexey Sokolov b666931883 Add an option to change ping timeout time.
Fix #979
2016-12-26 15:49:26 +00:00
Alexey Sokolov c803a85e13 Rename new On...Message modules callbacks to be more consistent.
OnPrivMessage -> OnPrivTextMessage
OnChanMessage -> OnChanTextMessage

Fix #1191
2016-12-25 15:48:29 +00:00
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