summary refs log tree commit diff
path: root/client.c (follow)
Commit message (Collapse)AuthorAge
* Use snprintf instead of strlcpyJune McEnroe2020-07-31
|
* Add additional permission for linking with LibreSSLJune McEnroe2020-06-08
| | | | https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
* Add server send queueing with time intervalJune McEnroe2020-05-11
| | | | | | | | | This addresses pounce getting killed with "Excess flood" when it sends NAMES commands for too many channels when a client connects. These commands, as well as automatic AWAY commands, are by default throttled to 5 per second. Tested on freenode with 36 channels and 200ms interval.
* Advertise STS policyJune McEnroe2020-02-27
| | | | | Duration is set to INT_MAX since pounce will never accept cleartext connections.
* Set consumer pos with CAP REQ causal.agency/consumer=nJune McEnroe2020-02-27
| | | | | So the spec doesn't say I can use cap values in CAP REQ. But it also doesn't explicitly say I can't.
* Rename causal.agency/consumer tag causal.agency/posJune McEnroe2020-02-27
|
* Add 1 to consumer ID tagsJune McEnroe2020-02-27
| | | | It should indicate the position after having seen the tagged message.
* Add causal.agency/consumer capabilityJune McEnroe2020-02-27
|
* Send CAP LS 302 to the serverJune McEnroe2020-02-27
|
* Properly treat CAP LS version as a numberJune McEnroe2020-02-27
|
* Support CAP LS 302 from clientsJune McEnroe2020-02-27
|
* Support cap-notifyJune McEnroe2020-02-27
|
* Support setnameJune McEnroe2020-02-26
|
* Support labeled-responseJune McEnroe2020-02-26
|
* Support batchJune McEnroe2020-02-26
|
* Clean up intercept tag skipJune McEnroe2020-02-26
| | | | "Tag skip" like it's a speedrun :3
* Also skip the origin in wordcmpJune McEnroe2020-02-26
| | | | I think for some caps we need to filter messages without origins.
* Use %n for tags when formatting intercepted PRIVMSG/NOTICEJune McEnroe2020-02-26
|
* Tweak buffer sizesJune McEnroe2020-02-26
| | | | | | Filter functions are dealing with lines not including CRLF, so they already have extra space. serverFormat is using snprintf which wants to always write a NUL at the end of the string.
* Add time tag to lines missing itJune McEnroe2020-02-25
| | | | | If a line was produced by another client, it won't have one from the server.
* Support message-tagsJune McEnroe2020-02-25
|
* Request server-time from the server and filter tags for clientsJune McEnroe2020-02-25
| | | | | | | | This doesn't yet, but it will break the "robustness principle" according to which a server "SHOULD NOT" assume that a client capable of parsing one tag is capable of parsing all tags. In future, TagCaps will have all other caps that use tags ORed into it, and only if the client supports none of them will tags be filtered out.
* Bump buffer sizes to allow for tagsJune McEnroe2020-02-25
| | | | | I still think this limit is unreasonably large in comparison to 512 for the actual message.
* Remove bad assertJune McEnroe2020-02-18
| | | | | If there's no room left in the buffer, tls_read will return 0 (since we gave it zero length to read into) and cause client->error to be set.
* Add option to set local client CAJune McEnroe2020-01-12
| | | | | | | | | This is a little bit messy. Allows setting either -A or -W or both. Implements SASL EXTERNAL for clients that expect that when connecting with a client certificate. Need to test that reloading still works inside capsicum, since I suspect that rewind call may be blocked.
* Add a vendor capability for passive clientsJune McEnroe2020-01-10
| | | | | | This way things like litterbox can do it automatically without having to be configured with a hyphen-prefixed username, which is usually invalid anywhere else.
* Intercept client QUIT with no parameter 1.0p3June McEnroe2019-12-28
| | | | Oops! Clients could get pounce to quit if they didn't send a message.
* Don't send self-PMs to the server 1.0p2June McEnroe2019-12-08
|
* Fix wordcmp return value when the words have differing lengthsMichael Forney2019-11-21
| | | | | | | | | | Otherwise, the result of strncmp gets converted size_t, since size_t has greater rank than int. Since wordcmp is only ever used as a boolean condition, this poses no real issue, but presumably, it is meant to behave like the other *cmp function and return a value less than, equal to, or greater than 0 depending on the result of the comparison.
* Declare globals as extern in headers, and define in source fileMichael Forney2019-11-21
| | | | | | | | | | | | | | | Otherwise, each source file that includes the header gets its own definition, and according to the C standard (C99 6.9p5): > If an identifier declared with external linkage is used in an > expression (other than as part of the operand of a sizeof operator > whose result is an integer constant), somewhere in the entire > program there shall be exactly one external definition for the > identifier Most compilers use the .bss section for zero data, but if it uses .data instead, or if -Wl,--warn-common is used, this will cause a linking error.
* client: Include time.h for gmtime and strftimeMichael Forney2019-11-20
|
* Format milliseconds as intJune McEnroe2019-11-20
| | | | | I don't know what I was thinking. I'm expecting a number less than 1000 of course that fits in int.
* Add concept of passive clientsJune McEnroe2019-11-14
|
* Use struct timeval for sub-second precisionJune McEnroe2019-11-14
|
* Remove server-time filter TODOJune McEnroe2019-11-14
| | | | | I think it's fine to keep it separate since it's a core function of the bouncer.
* Tweak filter regexesJune McEnroe2019-11-14
|
* Filter multi-prefixJune McEnroe2019-11-14
|
* Replace filters with regex replacesJune McEnroe2019-11-14
|
* Refactor filterUserhostInNamesJune McEnroe2019-11-13
|
* Factor out wordcpy for filtersJune McEnroe2019-11-13
|
* Skip initial NAMES parametersJune McEnroe2019-11-11
| | | | | | | Channel names can contain '!' so splitting the whole message on it won't work. I hate this code though.
* Filter userhost-in-namesJune McEnroe2019-11-11
| | | | I really want to be writing tests for these functions...
* Compare words without copying in filtersJune McEnroe2019-11-10
|
* Filter invite-notifyJune McEnroe2019-11-10
|
* Filter extended-joinJune McEnroe2019-11-10
|
* Filter ACCOUNT, AWAY, CHGHOST for incapable clientsJune McEnroe2019-11-10
|
* Maintain stateCaps and offer them to clientsJune McEnroe2019-11-09
|
* Parse capabilitiesJune McEnroe2019-11-09
| | | | | | The list that I've defined are the ones that I expect to be able to enable probably without any clients breaking... And of course server-time which pounce implements itself.
* Define macro for bit flag enumsJune McEnroe2019-11-09
|
* Only change AWAY status for registered clientsJune McEnroe2019-11-08
| | | | | | Turns out I did eventually fix this, because I may want to implement "passive clients" for logging or notification stuff, which wouldn't affect AWAY status either.