Commit Graph

109 Commits

Author SHA1 Message Date
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
Jos Ahrens ab501767a1 transperancy: Make the user aware that DEBUG mode is enabled. 2017-10-02 14:46:00 +02:00
Alexey Sokolov 46c5b2884e Don't send PART to client which sent QUIT
Reported by milky
2017-06-20 21:58:37 +01:00
Rubin 96c92ef8ca Change default flood rates to match RFC1459, prevent excess flood problems
I noticed that the default network flood rates are wrong (for most
networks). It has been very standard since the beginning of IRC to use a
value of 2 seconds per line, with a 10 line head start. Almost all
networks work this way, and if you don't follow, having a lot of
channels or a lot of clients connected to ZNC results in excess flood
disconnections and much frustration for the user.

I think you should make the default value for these 2 and 9 instead of 1
and 4 so that this nasty bug doesn't hit people who will not know how to
debug it. You find these same types of settings built into every IRC
client. 2 and 10 is the standard. 2 and 9 provides a slight buffer so
there is no mistake.

Thanks
-Rubin

Close #1416
2017-06-01 08:22:21 +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
xnrand 409ed4b6bc Add network-specific config for cert validation
Added the following two network-specific configuration options that can
be changed via controlpanel or webadmin:

* TrustAllCerts: Will trust ALL certificates when enabled, effectively
  disabling TLS certificate validation.
  Default value: false
* TrustPKI: Whether or not to trust PKI-valid certificates. Setting this
  to false will make znc trust only trusted certificates added by the
  user.
  Default value: true

With default values, behavior is exactly the same as before.

This is based on the work of Roelf Wichertjes. See YourBNC/znc@5c747598.

See znc/znc#866.
2016-05-20 01:17:26 +02:00
Alexey Sokolov e9006634cb Merge branch '1.6.x' 2016-01-09 18:23:06 +00:00
Alexey Sokolov 5d014193b4 Don't require reconnect after changing encoding. 2016-01-09 18:18:44 +00:00
Falk Seidel 8f73840e74 Welcome to 2016
🎆  Happy 2016 🎆
2016-01-01 20:11:21 +01:00
Alexey Sokolov 16a8c77737 Replace virtual with override where possible.
Using clang-tidy
2015-12-08 20:51:50 +00: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 0d8bb7e597 Merge branch '1.6.x'
Conflicts:
	modules/cyrusauth.cpp
	modules/keepnick.cpp
	modules/notes.cpp
2015-10-30 14:56:28 +00:00
Alexey Sokolov c8edabb035 Fix memory leak when reading invalid znc.conf
Found by https://scan.coverity.com/
2015-10-30 14:36:01 +00:00
John Reese 9aff0cd566 See #1147: show new server name when jumping
This updates the connect command in *status to retrieve the next server
object before triggering the jump, thereby allowing it to display the
next server's name rather than a generic message.
2015-10-25 12:41:00 -07:00
Jos Ahrens 2c8baa8193 ExpandString %network%, alphabeticize ExpandString list 2015-10-08 21:39:02 +02:00
J-P Nurmi 6ad7cdb4a2 Resolve #818: "Got ZNC?" is a little weird real name 2015-09-20 23:22:01 +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 068d5af719 Merge branch '1.6.x' 2015-08-29 21:16:33 +02:00
J-P Nurmi d2c462ae03 Fix yet another startup failure with awaynick & simple_away
The detection whether simple_away is already on the list of loaded
modules failed when the simple_away load line contained arguments.

Close #954
2015-08-29 21:13:52 +02:00
J-P Nurmi 38fb4cc444 Calculate per-network traffic (#963) 2015-08-22 01:27:23 +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 475acd8f00 Prefer TrimPrefix() over Left() + LeftChomp() 2015-08-14 12:29:42 +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
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 bb36d40580 CIRCNetwork: use member initialization list [-Weffc++] (#270) 2015-03-01 16:03:59 +01:00
Alexey Sokolov 56f8d8eb76 Merge pull request #906 from jpnurmi/weffc++
Use member initialization lists [-Weffc++] (#270)
2015-02-28 20:29:08 -08:00
J-P Nurmi 6a6bb648d1 Use member initialization lists [-Weffc++] (#270) 2015-02-28 21:59:01 +01:00
J-P Nurmi 2b0c6e595b Restore CIRCNetwork::ClearQueryBuffer() for convenience
Originally removed when query buffers were introduced in 14a534c.
The ideal name would be plural ClearQueryBuffers() now that there
are multiple query buffers, but use the old name for compatibility
reasons (see https://github.com/kylef/znc-contrib/pull/18).
2015-02-28 20:56:02 +01:00
J-P Nurmi b6f04d4b83 CIRCNetwork: 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 f27109f1b4 Implemented StripControls for channel messages and notices 2015-02-23 22:14:58 +01:00
J-P Nurmi 7345a6ee3a Fix CIRCNetwork::FindChans() and FindQueries() to be case-insensitive
The playback module failed to clear a buffer, because it tried to
clear "NickServ" whereas ZNC had internally stored it has "nickserv".
2015-02-19 08:45:58 +01:00
Falk Seidel 2e29d49a53 Welcome to 2015 2014-12-31 11:28:38 +01:00
Alexey Sokolov 8bc433a576 Convert fingerprint to lower case when adding it. 2014-12-14 10:33:57 +00:00
Alexey Sokolov c8f49e1da0 Merge pull request #754 from jpnurmi/ready
Add CClient::IsPlaybackActive()
2014-12-04 21:56:13 +00:00
Alexey Sokolov 6d7458c678 Merge branch 'ssl' 2014-12-02 21:24:49 +00:00
J-P Nurmi efe1e1ee91 Add CClient::IsPlaybackActive()
To let modules know whether a client is currently in playback mode.
The clientbuffer module (#343) wants to update "last seen message"
timestamps in OnSendToClient() but it must avoid doing that while
in playback mode.
2014-12-01 11:47:24 +01:00
Alexey Sokolov 4442af724f Validate TLS certificate of IRC server.
Fix #156
2014-11-29 14:25:15 +00: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 eedeb07cfe Merge pull request #752 from jpnurmi/findclients
Replace CIRCNetwork::FindClient() with FindClients()
2014-11-19 21:42:53 +00:00
J-P Nurmi d308d727f7 Replace CIRCNetwork::FindClient() with FindClients()
FindClient() is not enough, because there are no restrictions to used
identifiers. They don't necessarily need to be unique, and the same
identified client might re-connect meanwhile a ghost connection is
still hanging there.
2014-11-19 19:12:22 +01:00